How do you invoke dialog panel command in z/OS?

1.4k Views Asked by At

The official guide says to use the CMD(your_statement) function, but I keep getting an unrecognized keyword error. I am attempting to customize the ISPF primary option menu and I need to edit the panel so that when you press 'R' it runs a Rexx exec. Here is some of the code within the panel I am using:

 %                                                                  
 %                      ******************                          
 %                      *                *                          
 %                      * $2  %Edit      *                          
 %                      * $3  %Utility   *                          
 %                      * $6  %Command   *                          
 %                      * $SD %SDSF      *                          
 %                      * $D  %Datasets  *                          
 %                      * $X  %eXit      *                          
 %                      * $R  %REXX      *                          
 %                      *                *                          
 %                      ******************                          
 )PROC                                                              
   &ZSEL = TRANS ( TRUNC (&ZCMD,'.')                                
                 2,'PGM(ISREDIT) PARM(P,ISREDM01) SCRNAME(EDIT)'    
                 3,'PANEL(ISRUTIL) SCRNAME(UTIL)'                   
                 D,'PGM(ISRUDL) PARM(ISRUDLP) SCRNAME(DSLIST)'      
                 6,'PGM(ISRPTC) SCRNAME(CMD)'                       
                 SD,'PGM(ISFISP) NOCHECK NEWAPPL(ISF) SCRNAME(SDSF)'
                 R,'CMD(TSO EXEC 'IBM####.REXX(REXXSYSC)')'         
               ' ',' '                                              
                 X,'EXIT'                                           
                 *,'?' )                                            
   &NEXTOPT = .TRAIL                                                
 )END                                                               

The error happens when I try to assign the command statement to 'R'. My guess is that the quotations are interfering but TSO commands have to use those quotations to specify the location of the Rexx exec. What should be the correct syntax to get this Rexx exec running from the specified folder? Sorry about the indentation for the code it got a little screwed up...

2

There are 2 best solutions below

0
On

Though it's late to hop in to reply to this question, I felt I probably could add a pointer or two that may be useful for someone looking for a similar solution.

To check whether the library containing the source REXX code is included in SYSPROC / SYSEXEC, we could fire the following command:

TSO ISRDDN

You could easily verify if your library exists there. If not, it'll have to be included so that your target command can be executed directly. The link below illustrates how to add append your library to SYSEXEC / SYSPROC

http://ibmmainframes.com/about48417.html

Please be watchful though, the libraries in SYSEXEC / SYSPROC are quite sensitive and a Z/OS admin won't be pleased to see someone not authorised trying to sneak-peek into it!

Thanks.

1
On

From some very brief testing, it appears REXXSYSC must reside in a library which is in either the SYSPROC or SYSEXEC concatenation for your ISPF session, and then the syntax is

R,'CMD(%REXXSYSC)'