Using Irxjcl To Run An Exec In Mvs Batch - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

Running Execs in a Non-TSO/E Address Space
You can also use an exec processing routine to invoke an exec in a TSO/E address
space. Two reasons to use them in TSO/E are:
v To pass more than one argument to an exec. When invoking an exec implicitly or
v To call an exec from a program other than a CLIST or exec.

Using IRXJCL to Run an Exec in MVS Batch

To run a REXX exec in MVS batch, you must specify program IRXJCL in the JCL
EXEC statement. SYSEXEC is the default load DD. Running an exec in MVS batch
is similar in many ways to running an exec in the TSO/E background, however,
there are significant differences. One major difference is that the exec running in
MVS batch cannot use TSO/E services, such as TSO/E commands and most of the
TSO/E external functions. Additional similarities and differences appear in
"Summary of TSO/E Background and MVS Batch" on page 180.
The following series of examples show how an MVS batch job named USERIDA
invokes a REXX exec in a PDS member named
USERID.MYREXX.EXEC(JCLTEST). The member name, JCLTEST, is specified as
the first word after the PARM parameter of the EXEC statement. Two arguments,
TEST and IRXJCL, follow the member name. Output from the exec goes to an
output data set named USERID.IRXJCL.OUTPUT, which is specified in the
SYSTSPRT DD statement. The SYSTSIN DD statement supplies the exec with
three lines of data in the input stream. This exec also uses EXECIO to write a 1-line
timestamp to the end of the sequential data set USERID.TRACE.OUTPUT, which is
allocated in the OUTDD statement.
178
z/OS V1R1.0 TSO/E REXX User's Guide
explicitly, you can pass only one argument string. With IRXEXEC, you can pass
multiple arguments.
USERID.JCL.EXEC
//USERIDA JOB 'ACCOUNT,DEPT,BLDG','PROGRAMMER NAME',
// CLASS=J,MSGCLASS=H,MSGLEVEL=(1,1)
//*
//MVSBACH EXEC PGM=IRXJCL,
//
PARM='JCLTEST Test IRXJCL'
//*
|
//* Name of exec
<-----> |
//* Argument
//OUTDD
DD
DSN=USERID.TRACE.OUTPUT,DISP=MOD
//SYSTSPRT DD
DSN=USERID.IRXJCL.OUTPUT,DISP=OLD
//SYSEXEC DD
DSN=USERID.MYREXX.EXEC,DISP=SHR
//SYSTSIN DD
*
First line of data
Second line of data
Third line of data
/*
//
| |
|
|
<--------->

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents