Submitting batch loader directly to the current plan
Within Workload Automation Programming Language,
you can use batch loader statements to create an occurrence directly
in the current plan without creating the application in the database.
To do that, set ACTION(SUBMIT)
in the ADSTART
statement.
If OPTIONS DBMODE(ADD)
or OPTIONS
DBMODE(REPLACE)
is used, only the statements in Batch
Loader are used to build the occurrence in the plan. If OPTIONS
DBMODE(COPY)
or OPTIONS DBMODE(UPDATE)
is
used, any existing application with the same name in the database
is used as a model with the batch loader statements making amendments
to the version being added to the current plan, the database remains
unchanged.
The ADSTART
and subsequent segments perform
the equivalent of an INSERT CPOC
, so the batch
loader must be followed by an EXECUTE MCPBLK
to
commit the occurrence to the plan. Unless you specify OPTIONS
EXECUTE(MANUAL)
, this happens automatically before Workload Automation Programming Language terminates
your session with HCL Workload Automation for Z.
It is possible to follow the batch loader statements with MODIFY
or INSERT
statements
to amend the newly created occurrence before it is committed to the
current plan with an EXECUTE
statement. This
makes it possible to INSERT
predecessors or
successors between the occurrence being created and specific occurrences
already in the plan.
ADSTART ACTION(SETDEFAULT)
ADOP DURATION(1)
ADSTART ACTION(SUBMIT) ADID(DYNAMAPPL) DESCR('DEMONSTRATE SUBMIT')
OWNER(TWS) ODESCR('TWS INFRASTRUCTURE') PRIORITY(5)
ADOP WSID(CPU1) OPNO(1) JOBN(JOB1) DESCR('FIRST JOB')
ADOP WSID(CPU1) OPNO(10) JOBN(JOB2) DESCR('SECOND JOB')
ADOP WSID(CPU1) OPNO(20) JOBN(JOB3) DESCR('THIRD JOB')
ADOP WSID(CPU1) OPNO(30) JOBN(JOB4) DESCR('FOURTH JOB')
ADOP WSID(CPU1) OPNO(255) JOBN(JOB5) DESCR('LAST JOB')
MODIFY CPOP OPNO(1)
INSERT CPPRE PREADID(PLANNEDAPPL) PREIA(0803081200) PREOPNO(030)
EXECUTE MCPBLK
INSERT
or MODIFY
statements
can be used to alter it. Batch loader statements (such as, for example, ADSTART
and ADOP
)
cannot be interleaved with current plan commands (such as, for example, MODIFY
and INSERT
).