Automatic Operation numbering

The Operation number is the unique identifier of an Operation within an Application. It is specified by the OPNO argument on the ADOP statement which defines each operation.

If you omit the OPNO argument from an ADOP statement, Workload Automation Programming Language can automatically allocate operation numbers for you. Workload Automation Programming Language calculates the operation number by adding an interval (the default is 1) to the previous operation number. If the first operation number is omitted, the previous operation number is assumed to be zero, meaning the first operation number will be equal to the interval.

The interval can be set by using the ACTION(SETDEFAULT) process to set OPNO, the operation number you set using this method is not the default operation number, but becomes the interval between them when OPNO is omitted.

For example, the following command sets an interval of 5 between automatically allocated operation numbers:
ADSTART ACTIONS(SETDEFAULT) 
      ADOP OPNO(005)
If the interval is larger than the previous operation number, the generated operation number is set to the value of the interval. In the following example, JOB1 is given an operation number of 005, with 010 and 015 for JOB2, and JOB3 respectively:
ADSTART ACTIONS(SETDEFAULT) 
      ADOP OPNO(005) DURATION(1)
      ADSTART ADID(MYAPPL) OWNER(TWS)
      ADOP WSID(NONR) OPNO(001) JOBN(START) AUTOPRED(PREV)
      ADOP WSID(CPU1) JOBN(JOB1)
      ADOP WSID(CPU1) JOBN(JOB2)
      ADOP WSID(CPU1) JOBN(JOB3)
      ADOP WSID(NONR) OPNO(255) JOBN(LAST)
Automatically allocated operation numbers can be identified in the Workload Automation Programming Language output as the OPNO keyword is prefixed with a plus sign (+) on the listed ADOP statements:
EQQI200I ADSTART ADID(TESTSORT) OWNER(TWS)                
EQQI203I ADOP WSID(DUMM) JOBN(JOB1) AUTOPRED(PREV) OPNO(1)
EQQI203I ADOP WSID(DUMM) JOBN(JOB2) +OPNO(005)            
EQQI203I +ADDEP PREOPNO(1)                                
EQQI203I ADOP WSID(DUMM) JOBN(JOB3) +OPNO(010)            
EQQI203I +ADDEP PREOPNO(5)                                
EQQI203I ADOP WSID(DUMM) JOBN(JOB4) +OPNO(015)            
EQQI203I +ADDEP PREOPNO(10)                               
EQQI203I ADOP WSID(DUMM) JOBN(JOB5) +OPNO(020)