Example of control statement sequence
This example shows the structure and sequence of batch-loader control statements. Do not worry if you do not understand all of it, because only the basic structure is important. The parameters are described in detail later.
OPTIONS SUBSYS(EIDA) CHECK(Y)
ADSTART ACTION(SETDEFAULT) ADTYPE(A) DESC('PAYROLL SAMPLE')
ODESCR('SAMPLE APPLICATION') PRIORITY(5)
OWNER(SAMPLE)
ADRULE ACTION(SETDEFAULT) TYPE(R)
ADSTART ADID(PAYDAILY) DESCR('DAILY PAYROLL JOBS')
ADAPD APDADID(PAYDAILYPRED)
DESC(’WAIT FOR PAYDAILYPRED’) APDCSEL(R)
APDWSID(CPU1) APDOPNO(020) APDIVTYPE(R)
APDIVFWHE(B) APDIVFHHH(012) APDIVFMM(30)
ADPIVTWHE(A) APDIVTHHH(000) APDIVTMM(15)
ADRUN NAME(DAILY) RULE(1) DESCR('RUN EVERY WORK DAY')
IATIME(1200) DLTIME(1600)
ADRULE EVERY DAY(WORKDAY) YEAR
ADOP WSID(SETP) OPNO(10) JOBN(PAYDAILY)
DESC('SETUP FOR PAYDAILY') DURATION(5)
ADOP WSID(CPU1) OPNO(20) JOBN(PAYDAILY)
DESC('PAYDAILY JOB') DURATION(5) PREOP(10)
ADSR RES(PAYROLL.DATABASE) USAGE(X)
ADOPEXTN EXTNAME(' ')
ADSTART ADID(GPAYW) DESCR('WEEKLY PAYROLL GROUP') ADTYPE(G)
ADRUN NAME(THURS) RULE(1) DESCR('RUN ON THURSDAY')
IATIME(1200) DLTIME(1600)
ADRULE EVERY DAY(THURSDAY) YEAR
ADSTART ADID(PAYW) DESCR('WEEKLY PAYROLL JOBS') ADGROUP(GPAYW)
ADOP WSID(SETP) OPNO(10) JOBN(PAYWEEK)
DESC('SETUP FOR PAYWEEK') DURATION(5)
ADOP WSID(CPU1) OPNO(20) JOBN(PAYWEEK)
DESC('PAYWEEK JOB') DURATION(5) PREOP(10)
ADDEP PREWSID(CPU1) PREOP(020) PREADID(PAYDAILY)
DESC('WAIT FOR PAYDAILY') PRECSEL(R)
ADXIV ADXIVADID(PAYDAILY) ADXIVWSID(CPU1) ADXIVOPNO(020)
ADXIVTYPE(R) ADXIVFWHE(B) ADXIVFHHH(012) ADXIVFMM(30)
ADXIVTWHE(B)ADXIVTHHH(000) ADXIVTMM(15)
ADOPEXTN EXTNAME('CALCULATE SIMPLE PAYWEEK JOB')
OISTART ADID(PAYW) OPNO(020)
OIT 'Please note...'
OIT 'If this job (PAYWEEK) fails, automatic recovery'
OIT 'will be attempted for some situations.'
RGSTART RGNAME(BLRG0001) RGIATIME(1812)
RGCALEND(CALSUN) RGOWNER(FRZAP12)
RGRUN NAME(RUNR2) TYPE(A) RULE(1) VALFROM(121020) VALTO(121031)
IATIME(1430) SUBSETID(A3) CALENDAR(CALSAT) JVTAB(TABLE1)
ADRULE EVERY DAY(WORKDAY) YEAR
RGRUN NAME(RUNR3) TYPE(R) RULE(4) VALFROM(121017)
ADRULE EVERY DAY(DAY) YEAR
RGRUN NAME(RUNR4) TYPE(R) RULE(4) VALFROM(121017)
ADRULE EVERY DAY(DAY) YEAR
RGSTART RGNAME(BLRG0002) RGJVTAB(TABLE1)
RGRUN NAME(RUNR1) TYPE(A) RULE(1)
ADRULE EVERY DAY(DAY) YEAR
You can find simple examples at the end of each control statement section and in Batch-loader sample.
Deciding whether
to update the active subsystem illustrates the differences
between updating the active subsystem or using a VSAM data set.
| If you update the active subsystem: | If you use independent VSAM data sets: |
|---|---|
| The IBM® Z Workload Scheduler subsystem must be active. | The IBM® Z Workload Scheduler subsystem need not be active. |
| Code the SUBSYS keyword on the OPTIONS statement. | Provide the EQQADDS, EQQAD2DS, EQQOIDS, EQQWSDS DD names in the batch-loader JCL, and the associated data sets. See How to run the batch-loader program. |
| You can use the added application descriptions and operator instructions as soon as the job ends. | You must shut down the IBM® Z Workload Scheduler subsystem, allocate the new data sets, and restart the subsystem, before the new application descriptions and operator instructions can be used. |
| You might have problems if the batch loader goes wrong, and leaves incomplete application descriptions and operator instructions in the active database. | You can delete and redefine the VSAM data sets and rerun the batch loader if things go wrong. |
| There can be performance problems if your IBM® Z Workload Scheduler subsystem is busy writing to the active database. You might have to turn off AUDIT for the AD, OI, and RG databases to stop the auditing file filling up. | There is little impact on the active IBM® Z Workload Scheduler subsystem. |