Running an exec in the TSO/E address space
![Start of change](./delta.gif)
EXEC 'USERID.MYREXX.EXEC(TEST4)'EXEC
![End of change](./deltaend.gif)
![Start of change](./delta.gif)
%TEST1
![End of change](./deltaend.gif)
For more information about how to invoke an exec in TSO/E foreground, see z/OS TSO/E REXX User's Guide.
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K,PARM='TEST4'
//SYSEXEC DD DSN=USERID.MYREXX.EXEC,DISP=SHR
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSEXEC DD DSN=USERID.MYREXX.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=A
//SYSTSIN DD *
%TEST4
or
EXEC 'USERID.MYREXX.EXEC(TEST4)'EXEC
/*
//
See z/OS TSO/E REXX User's Guide for more information about invoking execs.
From a program that is written in a high-level programming language, you can use the TSO service facility to invoke the TSO/E EXEC command to process a REXX exec. z/OS TSO/E Programming Services describes the TSO service facility in detail.
You can also invoke a REXX exec from an application program by using the exec processing routines IRXJCL and IRXEXEC. Although IRXJCL and IRXEXEC are primarily used in non-TSO/E address spaces, they are programming interfaces to the language processor that you can use to run an exec in any address space, including TSO/E. For example, in an assembler or PL/I program, you could invoke IRXJCL or IRXEXEC to process a REXX exec.
The IRXEXEC routine gives you more flexibility in processing an exec. For example, if you want to preload an exec in storage and then process the preloaded exec, you can use IRXEXEC. Exec processing routines - IRXJCL and IRXEXEC describes the IRXJCL and IRXEXEC interfaces in detail.