Invoking Z Data Tools functions from a REXX procedure or CLIST in /BATCH mode

Some functions which do not require user interaction (such as DSC, DSP, DVT, FCH, and SCS) and are otherwise available for JCL batch processing can also be invoked from a REXX program under TSO/ISPF in a "pseudo-batch" mode.

This mode can be achieved by specifying a /BATCH parameter on Z Data Tools invocation. When specified, it forces batch-type processing while executing under TSO/ISPF. Before invoking the program you must allocate all the required data sets, including SYSIN and SYSPRINT. All program output is written to the data set defined by SYSPRINT. The following shows a sample program invocation from a REXX program using the /BATCH parameter:
/* rexx */
"ALLOC DD(SYSPRINT) NEW LRECL(132) RECFM(F B) DSORG(PS) REUSE SPACE(1 1) CYL"
"ALLOC DD(DDIN) DA('TEST.PDS') SHR REU"
"ALLOC DD(SYSIN) NEW LRECL(80) RECFM(F B) DSORG(PS) REUSE SPACE(1) TRA"
PARM.0 = 3;
PARM.1 = "$$FILEM SET HEADERPG=NO"
PARM.2 = "$$FILEM FCH MEMBER=* INPUT=DDIN "
PARM.3 = "C '12AFSDF' '2ASDFSD'"
"EXECIO * DISKW SYSIN (STEM PARM. FINIS"
"CALL *(HFMMAIN) '/BATCH'"
/* or "HFMMAIN '/BATCH'" */
SAY RC
"EXECIO * DISKR SYSPRINT (STEM SP. FINIS"
DO I = 1 TO SP.0
SAY SP.I
END
"FREE DD(DDIN SYSIN SYSPRINT)"