-REXC (REXX and CLIST macro execution)
The -REXC command allows a REXX or CLIST subroutine to execute outside of the worklist and return back to the worklist after the subroutine is completed.
In order to use this feature, you must perform the following actions:
- Allocate any files required for the EXEC's processing either dynamically or via JCL.
For implicit data set location of the REXX exec the worklist must contain:
-REXC 000450 MYREXXMYREXX is the member containing the REXX exec. The user must manually insert in the Execution JCL, for foreground or batch processing, the following DD statement:
//SYSPROC DD DSN='loc.of.rexx.exec'Alternatively, you can specify the name of a partitioned data set in which a REXX EXEC is a member for the Sysexec option on the JCL Generation Jobcard Options panel. The name of the data set is included in the //SYSEXEC DD in the Execution JCL, as shown in the following example:
//SYSEXEC DD DSN='loc.of.rexx.exec'For explicit data set location of the REXX exec the worklist must contain:
-REXC 000450 EX 'loc.of.rexx.exec(
MYREXX)'
- Ensure that the return code for the REXX exec is sent back through IKJEFT1B. This means that a final REXX statement of EXIT RC (where RC is the return code to pass back to AEXEMAIN) must be included.
Related topic