Automatic dependencies
Batch loader can create automatic dependencies within an
application by using the OPTIONS ADDEP
keyword
and the ADOP AUTOPRED
and ADOP
AUTOSUCC
statements, when adding or replacing an entire
application.
The AUTOPRED
and AUTOSUCC
keywords
are set in the ADOP
statements and cause the
automatic creation of dependencies based on the batch loader statements
for any operations that follow.
nnn
- Operation number. Predecessors or successors will be made to the specified operation number automatically.
FIRST
- Predecessors or successors will be made to theWorkload Automation Programming Language designated first operation number automatically.
LAST
- Predecessors or successors will be made to the Workload Automation Programming Language designated last operation number automatically.
OFF
- The current level of
AUTOPRED
orAUTOSUCC
will be stopped. If a previousAUTOPRED
orAUTOSUCC
was specified but not stopped by anOFF
argument, then the previous setting will be resumed. PREV
- This is valid only for
AUTOPRED
and will make any subsequent operations automatically dependent on the operation identified by the precedingADOP
statement.
The OPTIONS FIRST
and OPTIONS
LAST
keywords can also specify automatic dependencies
to the FIRST
and LAST
operations
by using LINK
argument.
For example, OPTIONS FIRST(1,LINK)
names
operation 1 as the first operation and will make operation 1 an automatic
predecessor to any operations specified in batch loader with no explicit
predecessors.
By default, automatic dependencies are only made to operations without any explicit dependencies made from or to them in the batch loader.
For example, AUTOPRED(FIRST)
will only
make operations dependent on the first operation that do not have
any explicitly specified predecessors, equally AUTOSUCC(LAST)
will
only make the last operation dependent on operations that have no
explicit successors.
To make automatic dependencies take place regardless of whether
explicit dependencies exist you can use the ALL
argument.
For example, AUTOPRED(010,ALL)
will make
every operation dependent on operation 010, or OPTIONS
LAST(255,LINK,ALL)
will make operation 255 a successor
to every operation in the application.
Precedence: When deciding whether an automatic dependency
when ALL
is not specified, the following dependencies
are assessed in this order:
ADOP
andADDEP
statements created explicitly by the userAUTOSUCC
keywordsAUTOPRED
keywordsOPTIONS
LAST
OPTIONS
FIRST
- Automatic dependencies can ONLY be addressed to specific operations
by the operation number, not by using Jobname or Workstation name.
When considering whether an operation already has a predecessor or
successor Workload Automation Programming Language only acknowledges
them from a statement that uses the operation number. It is therefore
recommended that any manual dependencies made in conjunction with
automatic dependencies should be performed using
PREOPNO
to ensure the desired result is achieved. - Automatic dependencies are not permitted when using
OPTIONS UPDATE
orOPTIONS COPY
. - Automatic dependencies are for internal dependencies only.
- Automatic dependencies rely on the order of the
ADOP
statements when resolving dependencies. TheADOP
statements do not have to be specified in numerical order to build an application, as Workload Automation Programming Language will ensure the resulting application has operations in numeric sequence so it is possible to exploit this, for example, to have 255 as your logical end point of an application, and still have higher numbered operations as predecessors to it, as long as you specify operation 255 last.In the following example, operations 010 to 110 are all successors to 001 and predecessors to 255.OPTIONS FIRST(1,LINK) LAST(255,LINK)
ADSTART ADID(MYAD) OWNER(TWS)
ADOP OPNO(001) WSID(NONR) DURATION(1)
ADOP OPNO(010) WSID(CPU1) JOBN(JOB01) DURATION(1)
ADOP OPNO(020) WSID(CPU1) JOBN(JOB02) DURATION(1)
ADOP OPNO(030) WSID(CPU1) JOBN(JOB03) DURATION(1)
ADOP OPNO(040) WSID(CPU1) JOBN(JOB04) DURATION(1)
ADOP OPNO(050) WSID(CPU1) JOBN(JOB05) DURATION(1)
ADOP OPNO(060) WSID(CPU1) JOBN(JOB06) DURATION(1)
ADOP OPNO(070) WSID(CPU1) JOBN(JOB07) DURATION(1)
ADOP OPNO(080) WSID(CPU1) JOBN(JOB08) DURATION(1)
ADOP OPNO(090) WSID(CPU1) JOBN(JOB09) DURATION(1)
ADOP OPNO(100) WSID(CPU1) JOBN(JOB10) DURATION(1)
ADOP OPNO(110) WSID(CPU1) JOBN(JOB11) DURATION(1)
ADOP OPNO(099) WSID(NONR) DURATION(1)