ADDJOB – Add job to the current plan
Use the ADDJOB
command to add a
job to the current plan by using attributes from the application where
the job is defined.
ADDJOB <jobname> [ADID(<adname>)] [COMPSUCC(IGNORE|WARNING|ERROR]
[CPDEPR(YES|PREDECESSORS|SUCCESSORS|NO)]
[CRITERIA(CLOSEST|MANUAL|SAMEDAY)] [DEPTIME(yymmddhhmm)]
[EXTLINK(APPL|JOB|WSJOB)] [GROUPDEF(<application-group>)]
[GROUP(<authority-group>)] [HOLD(YES|NO)
[IA(yymmddhhmm)]
[IGNORE(=ALL,=NONE,=FIRST,=LAST,=<wstype>,<wsname>,<opno>)]
[INTLINK(APPL|JOB|WSJOB)] [JCL('<library>(<member>)')
[MULTI(FAIL|FIRST|LAST)]
[NOTFOUND(FAIL|SUBMIT)] [OWNER(<owner>)]
[PFX(<prefix>)]
[SFX(<prefix>)] [VALFROM(yymmdd)] [VALID(yymmdd)]
[VALTO(yymmdd)] [WSNAME(<wsid>)]
where:- The first positional parameter
- The job name to find.
ADID
- A filter field to restrict the search to the application named in this keyword. Wildcards are allowed.
COMPSUCC
- Determines the action to take when a successor is identified as
already completed. A complete successor cannot be added as an external
dependency. The equivalent
OPTIONS
keyword sets the default.IGNORE
- Do not add the dependency and issue an advisory message (RC=0).
WARNING
- Do not add the dependency and issue an advisory message (RC=4). This is the default.
ERROR
- Do not add the dependency and issue an advisory message (RC=8).
CPDEPR
- Specifies whether to resolve dependencies:
YES
- Resolve both predecessors and successors (default).
PREDECESSORS
- Resolve only predecessors.
SUCCESSORS
- Resolve only successors.
NO
- Do not resolve any dependencies.
CRITERIA
- How to resolve dependencies. The
ADDJOB
command ignores individual dependency resolution criteria in the database. Only theCRITERIA
keyword determines the method to be used:CLOSEST
- Use the “Closest preceding” method.
SAMEDAY
- Use the “Same day” method.
MANUAL
- No dependencies as resolved, additional dependencies can be manually added.
DEPTIME
- The time to be used to resolve dependencies from. If specified
the job being added will resolve its dependencies as if the
DEPTIME
is it's operation input arrival. IfDEPTIME
is not specified, the value of theIA
keyword is used. If neitherDEPTIME
orIA
is specified, the current date and time are used. EXTLINK
- How to find the target external dependencies:
APPL
- Use the application ID and operation number in the dependency definition (default).
JOB
- Use the job name in the dependency definition.
JOBWS
- Use the job name and workstation name in the dependency definition.
GROUPDEF
- A filter field to restrict the search to the members of the application group named in this keyword. Wildcards are allowed.
GROUP
- A filter field to restrict the search to the authority group named in this keyword. Wildcards are allowed.
HOLD(YES|NO)
- Determines whether the added job is held or not when added to the plan (default is No).
IA
- The Input Arrival to use when creating the occurrence. If the
IA
is already in use for an occurrence, the command fails. IGNORE
- Specifies a list of elements to define the internal dependencies
to be ignored when adding the job to the current plan. The default
is
=FIRST
=LAST
to ignore internal dependencies to the first and last operations. The default is set byOPTIONS IGNORE
.The following elements can be combined:=ALL
- Ignore all internal dependencies.
=NONE
- Do not ignore any internal dependencies.
=FIRST
- Ignore the first operation (as defined by OPTIONS FIRST).
=LAST
- Ignore the last operation (as defined by OPTIONS LAST).
<wstype>
- Ignore operations that use a particular workstation type. Valid types are
AUTO
,CPU
,DUMMY
,PRINT
,REMOTE-D
,REMOTE-Z
,SETUP
,STC
,VIRTUAL
,WAIT
,WTO
orZCENTRIC
. <wsname>
- Ignore operations that use a particular workstation.
<opno>
- Ignore operations on a particular operation number.
INTLINK
- How to find the target internal dependencies:
JOBWSx(
- Use the job name and workstation name in the dependency definition (default).
APPL
- Use the application ID and operation number in the dependency definition.
JOB
- Use the job name in the dependency definition.
JCL('<library>(<member>)')
- Specifies the name of a library and member containing the JCL to be run for this job, instead of the information that would usually retrieved from the HCL Workload Automation for Z libraries. This keyword must point to a member of the specified library, it cannot be provided from a sequential file. The library and member name must be specified within single quotation marks.
MULTI
- Specifies what to do if the job is found more than once.
FAIL
ends in error if more than one match is found (default).FIRST
reports only the first place that is found.LAST
reports only the last place that is found. NOTFOUND
- Specifies what to do if the job is not found in the database:
SUBMIT
- Generates an occurrence to submit the job (default).
FAIL
- Causes the job to fail with RC=8.
OWNER
- A filter field to restrict the search to applications with the owner ID specified. Wildcards are allowed.
PFX(<prefix>)
- The prefix to use in the generated occurrence name. The occurrence
name is formed from the value of
PFX
, the job name, andSFX
combined. The default for this value is set byOPTIONS ADPFX
. SFX(<suffix>)
- The suffix to use in the generated occurrence name. The occurrence
name is formed from the value of
PFX
, the job name, andSFX
combined. The default for this value is set byOPTIONS ADSFX
. UPDATE(YES|NO)
- Specifies whether the update to the current plan is made. When
UPDATE(NO)
is specified, the actions of forming the definition of the occurrence take place, but no updates are made to the current plan. You can create a list with the actions that would be performed by specifyingOPTIONS TRACE(1)
. The default is set byOPTIONS UPDATE
. VALFROM
- A filter field to restrict the search to applications matching the valid from date specified. Wildcards are allowed.
VALID
- A filter field to restrict the search to applications that are valid on the date specified. ildcards are allowed.
VALTO
- A filter field to restrict the search to applications matching the valid to date specified. Wildcards are allowed.
WSNAME
- A filter field to restrict the search to applications containing the workstation specified. Wildcards are allowed.
The ADDJOB
command creates a dynamic occurrence
in the current plan, using the attributes of the job found in the
database. They include all operation attributes, extended information,
automation attributes, special resources, and user fields. The command
ignores predecessor selection criteria and conditional dependencies,
because this is a dynamically added occurrence, therefore these elements
can be dealt with by the process performing the add.
The dependencies defined to the job are processed by the ADDJOB
command in accordance with the CPDEPR
, EXTLINK
, and INTLINK
keywords. By default, to find external dependencies
the application name and operation number are used, while to find
the internal dependencies, the job name and workstation name are used.
The CRITERIA
keyword specifies how to resolve
the dependencies. The predecessor resolution is done by using the
input arrival that is determined as follows:
DEPTIME
specifies the input arrival to use for dependency resolution.- If
DEPTIME
is not set, the time specified inIA
is used. - If both
DEPTIME
andIA
are not specified and the Workload Automation Programming Language job is controlled by HCL Workload Automation for Z, the input arrival of the controlling occurrence is used. - In all other cases, the current date and time are used.
Predecessor resolution is performed using the criteria as if evaluated from the perspective of the job being added, using the input arrival time as derived above.
Successor resolution is performed using the criteria as if evaluated from the perspective of the successor to the job being added, using the input arrival time of the successor to the input arrival of the job being added as derived above.
If a matching job is not found, and NOTFOUND
is set to SUBMIT
, then a simple dynamic
occurrence using default values for all job attributes will be used.
If the WSNAME
keyword was specified without
using wildcards then it will be used as the workstation in the generated
occurrence. Otherwise the value of OPTIONS ADWS
will be used, which is CPU1 by default.
If the job name argument of the ADDJOB
keyword
contained wildcards, the submission fails if not matching job is found,
regardless of the setting of NOTFOUND
.
PFX
, job name,
and SFX
exceeds 16 characters it will be truncated
at 16 characters.