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.

The keywords can contain the following values:
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 or AUTOSUCC will be stopped. If a previous AUTOPRED or AUTOSUCC was specified but not stopped by an OFF 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 preceding ADOP 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:

  1. ADOP and ADDEP statements created explicitly by the user
  2. AUTOSUCC keywords
  3. AUTOPRED keywords
  4. OPTIONS LAST
  5. OPTIONS FIRST
Note:
  1. 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.
  2. Automatic dependencies are not permitted when using OPTIONS UPDATE or OPTIONS COPY.
  3. Automatic dependencies are for internal dependencies only.
  4. Automatic dependencies rely on the order of the ADOP statements when resolving dependencies. The ADOP 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)