MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To Execute a REXX PRogram thru a PANEL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Haran
Beginner


Joined: 11 Jul 2003
Posts: 1
Topics: 1

PostPosted: Fri Jul 11, 2003 4:12 am    Post subject: To Execute a REXX PRogram thru a PANEL Reply with quote

Hi,
There is a PANEL(Displaying a List of programs) thru which the user can Execute his Program of wish.Which Command should i use to Execute the User entered Program.Any sample code will be very Useful.



Thanks,
Haran
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Sun Jul 13, 2003 5:01 pm    Post subject: Reply with quote

Within a panel you can use set the ISPF variable ZSEL or alternately you can use the SELECT service from within code.

Here's an example of setting ZSEL :-

Code:

)PROC                                                                   
 &zsel = Trans(Trunc(&zcmd,'.')                                         
  0,'CMD(AAAX0000)'                                                     
  1,'PANEL(MERP10&mervers)'                                             
  2,'CMD(MERX20&mervers)'                                               
  3,'CMD(MERX30&mervers)'                                               
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 13 Line(s) not Displayed
  X,'EXIT'                                                             
  x,'EXIT'                                                             
  ' ',' '                                                               
  '*','?')                                                             
)END                                                                   

Option 0 Invokes the AAAX0000 program, Option 1 Invokes a panel (with more selections), option 2 invokes the MERX20?? progam (?? being the version as held in the variable mervers), option 3 invokes the MERX30?? program.

here's how the panel looks :-
Code:

Option  ===>                                                                   
                                                                               
  0  DISPLAY - Alter Display Settings                                         
  1  BOOK    - Manage Request Bookings                                         
  2  VIEW    - View Bookings                                                   
  3  USER    - View and/or Amend User Details                                 
....... removed to reduce length .......
  X  X  EXIT    - Exit MITRE                                                     

It would be easy to select a user input progam by specifying the cmd parameter as a variable (similar to how mervers is used).

and here's and example of using SELECT from within a Rexx program:-
Code:

ADDRESS ISPEXEC "SELECT PGM("pgm_to_run") PARM(YYSLYNN)"

Where the variable pbm_to_run has the value of the program that is to be run.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group