EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #196 background image
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
explicitly, you can pass only one argument string. With IRXEXEC, you can pass
multiple arguments.
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.
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
/*
//
Running Execs in a Non-TSO/E Address Space
178
z/OS V1R1.0 TSO/E REXX Users Guide

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals