Haran Beginner
Joined: 11 Jul 2003 Posts: 1 Topics: 1
|
Posted: Fri Jul 11, 2003 4:12 am Post subject: To Execute a REXX PRogram thru a PANEL |
|
|
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 |
|
Mike Beginner
Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Sun Jul 13, 2003 5:01 pm Post subject: |
|
|
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. |
|