Supplying a procedure when invoking Z Data Tools from a REXX program
You can specify a PROC parameter to enhance Z Data Tools processing even when you are invoking the Z Data Tools function from a REXX program.
To use a procedure stored in a member of a PDS:
- Allocate an HFMEXEC DD that identifies a PDS where your saved procedures reside.
- Code PROC=member-name in the Z Data Tools function invocation.
For example, to use the procedure stored in USERID.HFMEXEC(TOTALS):
/* REXX program to print a data set, with enhanced processing */
/* as defined in the "nested" REXX procedure named TOTALS */
"ALLOC DD(HFMEXEC) DSN('USERID.HFMEXEC') SHR"
⋮
HFMMAIN "$DSP DSNIN='HFMUSER.TEST.KSDS1',PROC=TOTALS"
⋮
"FREE DD(HFMEXEC)"
Note: The TSO commands ALLOC and FREE can also be issued outside the REXX program.
To enter a procedure from the terminal
- Code PROC=* in the Z Data Tools function invocation.
- When you run the REXX program and it invokes the
Z Data Tools function, Z Data Tools prompts you to enter procedure statements with
the following messages:
Type your procedure statements, pressing the Enter key at the end of each line.SYSIN DD is allocated to terminal Enter card input (EOD=NULL REPLY):
- Enter
/+
as the last line to complete the procedure and indicate end of data. Z Data Tools then runs the requested function using the entered procedure.