4.5.13 Methods of specifying generations when executing commands
In JP1/AJS3, when you use a command to manipulate jobnet registration information (temporarily change the execution plan, rerun, kill, interrupt, or change the status of a jobnet), you can use the following methods to specify the target jobnet:
-
Automatically determine the target generation
-
Use execution ID to specify
-
Use registration number to specify
The following subsection describes the automatic determination of the target generation, and the use of registration numbers. For details on execution IDs, see 4.2 Managing jobnet generations.
You can also use the GUI for these operations. The operation is the same as when you specify a jobnet using an execution ID.
- Organization of this subsection
(1) Determining the generation of a jobnet automatically
This subsection describes the procedure for using a command to determine the generation of a jobnet automatically.
(a) Automatic judgment of target generation
When you register a jobnet for daily execution, normally JP1/AJS3 assigns an execution ID to each generation of the jobnet. Although assigned execution IDs are unique within a scheduler service, identifying the execution ID of the target generation can be difficult when an operation such as releasing held status is performed as part of a batch process.
As a remedy in such situations, you can omit the execution ID when you use a command. JP1/AJS3 will automatically search and determine the target generation. This is called automatic judgment of target generation.
(b) Priority in automatic judgment operations
When you perform an operation without specifying the target generation, the generation is selected by automatic judgment. Automatic judgment is based on the status of the root jobnet generations, in accordance with the priorities listed in the following table. The judgment is based on the root jobnet status even if the operation is to be performed on a job or a nested jobnet.
Operation |
Priority |
|||
---|---|---|---|---|
Highest |
High |
Low |
Lowest |
|
Temporarily change plan |
Now rerunning#1 |
Now running#2 |
Scheduled next |
Previous completed#4 |
Change job status, rerun |
Now rerunning#1 |
Now running#2 |
Previous completed#3 |
Scheduled next#4 |
Interrupt, kill |
Now rerunning#1 |
Now running#2 |
Previous completed#4 |
Scheduled next#4 |
- #1
-
Now rerunning refers to any of the following statuses resulting from re-execution:
-
Now running
-
Running + Warning
-
Running + Abend
-
Wait for start time
-
Being held
-
- #2
-
Now running refers to any of the following statuses, unless the status results from re-execution:
-
Now running
-
Running + Warning
-
Running + Abend
-
Being held
-
Now monitoring
-
- #3
-
Previous completed refers to the generation whose termination time is closest to the current time. For a jobnet with a start condition, however, this applies only to a monitoring generation.
- #4
-
Operations cannot be performed on generations in either of these statuses and might result in an error if attempted.
If there are multiple Now running generations and none in Now rerunning status, or if there are multiple Now rerunning generations, the criteria used in automatic judgment depend on whether a start condition applies. The judgment criteria for selecting the target generation of an operation are as follows:
- When a start condition does not apply
-
The generation whose scheduled start time is closest to the current time is selected as the target.
- When a start condition applies
-
-
If there is a monitoring generation in Now monitoring status, and an execution generation in Now running status, the monitoring generation is selected as the target.
-
If there is a monitoring generation that has finished monitoring, and an execution generation in Now running status, the first execution generation triggered when the start condition is satisfied is selected as the target.
-
If there are multiple monitoring generations (including any that have finished monitoring), the monitoring generation whose start time is closest to the current time takes precedence. This generation is selected if its status is Now monitoring. If its status is other than Now monitoring, the first execution generation triggered when the start condition is satisfied is selected.
-
If a jobnet with a start condition has a monitoring generation in Now monitoring status, and an execution generation in Now rerunning status, the rerunning generation is selected as the target.
-
An unintended generation could be selected as the target of an operation based on automatic judgment if the status of the root jobnet changes. This could occur, for example, when the scheduled start time of the next execution schedule arrives or when the active generation ends normally. If a jobnet is executed repeatedly on a daily basis, or if the next execution schedule is due to start very soon, the status of the root jobnet might have changed by the time a command operation is executed. In such cases, execute the ajsshow command to obtain the execution ID of the generation you want to target, and operate on the execution registration information, specifying the execution ID you obtained. For the ajsshow command syntax, see ajsshow in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
(2) Execution registration numbers
An execution registration number is a serial number assigned to each generation of a jobnet. This number is assigned in order according to the execution start time of the generation. The format of an execution registration number is YYYYMMDDNNN (YYYY: year of execution, MM: month of execution, DD: Day of execution, NNN: order of execution on execution day).
The following example shows how execution registration numbers are assigned when a jobnet is executed twice in one day.
|
Assume that a jobnet has an execution date of August 10 20XX. Based on this information, the execution registration number of the generation that is executed first will be 20XX0810001. The generation that is executed second will have the execution registration number 20XX0810002.
In this manner, execution registration numbers in the format YYYYMMDD001, YYYYMMDD002 are assigned in order of execution to each generation of a jobnet that is executed within one day. It is therefore much easier to specify a generation using an execution registration number, than by other means such as an execution ID.
Execution registration numbers are assigned according to the generations that exist at the time. Therefore, the same numbers can refer to different generations at different times, and depending on the timing of the command, you may not specify the generation you intended. The following figure shows an example where an execution registration number refers to different generations before and after a start condition is met.
|
In the above figure, the execution registration number 20XX0810002 corresponds to generation 1-2 before the start condition is satisfied. However, generation 1-2 is deleted by the generation management process when the start condition is next satisfied. Hence, the execution registration number 20XX0810002 corresponds to generation 1-3 after the start condition is met.
Other circumstances in which the execution registration number can change include:
-
When a generation is deleted due to the maximum number of logs to keep being exceeded.
-
When a generation is added or moved due to a time change.
-
When a schedule is added because a generation is either registered for fixed execution specifying an execution period or date, or registered for immediate execution.
-
When a generation is deleted by the execution prohibited function.
In an operation where generations of a jobnet are constantly being updated, we recommend that you use execution IDs instead of execution registration numbers to manipulate jobnets.