z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Running an exec in the TSO/E address space

z/OS TSO/E REXX Reference
SA32-0972-00

You can invoke a REXX exec in the TSO/E address space in several ways. To invoke an exec in TSO/E foreground, use the TSO/E EXEC command processor to either implicitly or explicitly invoke the exec and you must have ddname GRXBIMG allocated. z/OS TSO/E REXX User's Guide describes how to invoke an exec in TSO/E foreground.

You can run a REXX exec in TSO/E background. In the JCL, specify IKJEFT01 as the program name (PGM= ) on the JCL EXEC statement. On the EXEC statement, specify the member name of the exec and any arguments in the PARM field. For example, to execute an exec called TEST4 that is in data set USERID.MYREXX.EXEC, use the following JCL:
//TSOBATCH  EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K,PARM='TEST4'
//SYSEXEC   DD   DSN=USERID.MYREXX.EXEC,DISP=SHR
You can also invoke an exec implicitly or explicitly in the input stream of the SYSTSIN DD statement.
//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 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.

Note: You cannot invoke a REXX exec as authorized in either the foreground or the background.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014