Starting a REXX exec or CLIST

Use the Run Options page of the Menu Manager New Action Wizard to construct a menu action command that starts a REXX exec or CLIST.

  1. The partitioned data set (PDS) name that is used in the examples is $userid.MENUMGR.SAMPLES, where $userid is the logon user ID and high-level qualifier of the PDS. To allocate a PDS for the sample code, see the instructions in Allocating data sets.
  2. Follow the instructions in Running a TSO command, REXX exec, or CLIST command sequence to open the Menu Manager New Action Wizard, select or create a file for storing the action, and set the context for the action.
  3. On the Run Options page of the wizard, choose these options:
    • Use existing action > ID: com.ibm.ftt.ui.menumanager.tsoaction: Every TSO command, REXX exec, or CLIST uses this action ID to process the command.
    • Show output in dialog: Since many REXX execs and CLISTS include WRITE or SAY statements for messages, choose this property to display command output.
    Useful run options for a REXX exec or CLIST command

The following examples illustrate sample command strings, run options, and output for starting REXX execs or CLISTs.

Example 1: A REXX exec with no parameters

This command string runs the HELLO REXX exec, which displays a Hello World message in an output window. It substitutes the current logon ID for the $userid variable.
EX '$userid.MENUMGR.SAMPLES(HELLO)'
To try this command string, do these steps:
  1. Create a PDS member named <HLQ>.MENUMGR.SAMPLES(HELLO.rexx).
  2. Copy this code into the PDS member.
    /* REXX Hello Exec */
    SAY "Hello World"
    SAY "Take care now, y'all!"
    exit
  3. Copy the command string into the Run Options page of the new action wizard with these action properties.
    Menu Manager Run Options for HELLO.rexx
  4. Right-click the context that you defined for the menu action and select it from the menu. The REXX exec displays this output.
    Output for the HELLO.rexx menu action