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:

  1. Allocate an HFMEXEC DD that identifies a PDS where your saved procedures reside.
  2. 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

  1. Code PROC=* in the Z Data Tools function invocation.
  2. 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:
    SYSIN DD is allocated to terminal
    Enter card input (EOD=NULL REPLY):
    Type your procedure statements, pressing the Enter key at the end of each line.
  3. 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.