Input/output files

AXREXX allows TSO=NO invokers to pass an input data set via the REXXINDSN parameter and both TSO=NO and TSO=YES invokers to specify an output data set via the REXXOUTDSN parameter. The input data set is used by REXX functions that require input from a user such as PARSE PULL or could be read directly via EXECIO, using the DDNAME specified by the REXX variable AXRINDD. If an output data set is specified, any SAY or TRACE output from the exec is directed there. Data may also be written to the output data set via EXECIO using the DDNAME specified by the REXX variable AXROUTDD. Any error message that the REXX interpreter issues will also be directed to the output data set. If no output data set is supplied, SAY, TRACE, and REXX messages will be directed to the console specified by the CONSNAME keyword as part of a multi-line WTO AXR0500I. The AXREXX user should be careful not to flood the system with messages and be careful when using REXX Tracing when the output is directed to a console. If CONSNAME and REXXOUTDSN are both not specified, the output is lost.

Both the input and output data sets may be sequential or partitioned. In the case of the latter, the REXXINMEMNAME or REXXOUTMEMNAME keywords must be specified. If the output data set does not exist, System REXX will create a sequential or partiitoned data set consisting of 3 primary blocks, 3 secondary blocks and 1 directory block (if it is a PDS) where each block is 27920 bytes. The data set will be kept when the exec completes and excess space will be released. The data set specified by RexxInDsn will be allocated by System REXX with DISP=SHR, while the data set specified by RexxOutDsn will be allocated with DISP=OLD (or NEW if it does not exist).

If System REXX detects that the output data set runs out of space, the exec will be terminated and a return code of 12 will be returned to the AXREXX invoker. If there is no data for the PARSE PULL instruction in the input data set, the null string will be returned.