Using REXX to Display a Panel and Run Another REXX Command

In IBM mainframe environments using TSO/ISPF, a REXX program can display an interactive panel and then call another REXX routine. This is typically done with the ISPEXEC DISPLAY PANEL command.

/* panel.rex */
ADDRESS ISPEXEC
"DISPLAY PANEL(MYPANEL)"
CALL RUNNEXT
EXIT

RUNNEXT:
ADDRESS TSO "EXEC 'USERID.REXXLIB(NEXTCMD)'"
RETURN
                

ISPF panels define the user interface displayed by the REXX program.

)PANEL KEYLIST(ISR)
)ATTR DEFAULT(%+_)
% TYPE(TEXT) INTENS(HIGH)
_ TYPE(INPUT) CAPS(ON)

)BODY
%-------------------------------+
%        SAMPLE REXX PANEL      |
%-------------------------------+
+                               
+ Press ENTER to run next REXX  
+                               
+ Command ===> _ZCMD            
+                               
)END
                

After the panel interaction, another REXX program can be executed.

/* nextcmd.rex */
SAY "Second REXX command is now running."
EXIT
                
Quality, Reliability & Service
Thank You For Visiting
Brooks Computing Systems - Jacksonville
Visit https://bcs.archman.us