HZAAUTL examples
In the following examples, SYS2.SHZAMOD1 is the name of the program library containing the HZAAUTL program, and PROD.ASCDS is the name of the Automation Server control data set.
Example 1
A job submitted on a regular basis by the Automation Server is to report all pending data sets that are also intended to be processed by the same JOB action.
The following job step is added to the end of the existing JCL template member in the PARMLIB library:
//BACKLOG EXEC PGM=HZAAUTL
//STEPLIB DD DISP=SHR,DSN=SYS2.SHZAMOD1
//ASCDS DD DISP=SHR,DSN=PROD.ASACDS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
* Report all unprocessed data sets for this data flow
LISTPEND &ASACTION
/*Example 2
All records currently present in the ASCDS are to be listed.
//DUMPALL EXEC PGM=HZAAUTL
//STEPLIB DD DISP=SHR,DSN=SYS2.SHZAMOD1
//ASCDS DD DISP=SHR,DSN=PROD.ASACDS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
* List all records
LISTALL
/*Example 3
All records pertaining to the UIMPORT action are to be listed
//UIMPLST EXEC PGM=HZAAUTL
//STEPLIB DD DISP=SHR,DSN=SYS2.SHZAMOD1
//ASCDS DD DISP=SHR,DSN=PROD.ASACDS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
* List all UIMPORT records
LISTALL UIMPORT
/*
Example 4
The following data sets have all been processed by action DATAPROC successfully:
HLQ.MYFILE
HLQ.MYFILE.DATA1
HLQ.MYFILE.DATA2
HLQ.MYFILE.DATA3
HLQ.MYFILE.DATA4
but HLQ.MYFILE needs to be reprocessed.
HLQ.MYFILE alone is set to awaiting-retry by the following job step:
//RETRY1 EXEC PGM=HZAAUTL
//STEPLIB DD DISP=SHR,DSN=SYS2.SHZAMOD1
//ASCDS DD DISP=SHR,DSN=PROD.ASACDS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
MAKEPEND DATAPROCHLQ.MYFILE
MAKEDONE DATAPROCHLQ.MYFILE.
/*
Example 5
It is decided that a job submitted by the Automation Server should flag its own retry requirement if processing fails. Processing is deemed to have failed if any job step ends with a condition code greater than 4 or if any step abends.
Assuming local naming conventions prevent the existence of other data sets (processed by the Automation Server) with names that begin with the name of the data set being processed by the job, the following job step can be appended to the job’s JCL template in the PARMLIB library:
//FAILURE EXEC PGM=HZAAUTL,COND=((4,GE),EVEN)
//STEPLIB DD DISP=SHR,DSN=SYS2.SHZAMOD1
//ASCDS DD DISP=SHR,DSN=PROD.ASACDS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
MAKEPEND &ASKEY
/*