Job Management Partner 1/Automatic Job Management System 3 Overview
You can change the definitions of the jobnets and jobs below a root jobnet that is registered for execution, without canceling the registration of the jobnet.
You can use the suspend function to change the definitions below the root jobnet without canceling registration of the root jobnet. Suspending the root jobnet means suppressing unit execution over all generations of the specified root jobnet. Units are not executed once they are suspended. However, any units that are already running continue to be processed.
When you change the lower-level definitions of a registered root jobnet, use the suspend function to prevent malfunctions such as the definition processing being out of sync with the execution control processing. By suspending the root jobnet, you can change definitions by synchronizing them with the execution control processing.
You can perform suspend operations using JP1/AJS3 - View or the ajssuspend command. For the procedure using JP1/AJS3 - View, see 9.13 Changing the lower-level definition of a jobnet registered for execution in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide. For the command operation, see ajssuspend in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
- Organization of this subsection
- (1) Changing definitions while the root jobnet is registered for execution
- (2) Procedure for editing definitions
- (3) Suspend operations
- (4) Status change of suspended jobs and jobnets
- (5) Scheduling after suspension is released
- (6) Inheriting macro variables when adding an event job
(1) Changing definitions while the root jobnet is registered for execution
You can change the lower-level definitions under a root jobnet while the root jobnet is suspended.
The following conditions are required for you to be able to edit definitions while the root jobnet is registered for execution.
- The root jobnet is suspended
- The target is not being edited exclusively elsewhere
(a) Changes you can make to definitions
The changes you can make to definitions while the root jobnet is registered for execution, and the changes that are unavailable are listed below.
- Changes that are available
- Adding a new unit
- Changing an existing definition
- Deleting an existing unit
- Changing the map size
- Adding a start condition
- You can also change the definition of units defined under a remote jobnet.
- Changes that are unavailable
- Changing the name of an existing unit
However, you can change the name of a unit added during suspension.
- Moving a unit
To move a unit, first copy the source unit and paste it to the destination. Then delete the source unit.
- Deleting a running unit
The following paragraphs describe in detail the types of editing you can perform on lower-level definitions while the root jobnet is registered for execution, and the points to consider when editing a definition.
- Adding a new unit
- You can add a new unit. The status of the added unit during suspension depends on the status of the jobnet one level above the unit. The following table shows the status of the unit one level above the added unit, and the status of the added unit.
Table 4-8 Status of a unit added during suspension
Status of unit one level above added unit Status of added unit Waiting Not scheduled Now running Not scheduled Ended Bypassed
- Changing an existing definition
- You can change an existing definition. However, note the following:
- You cannot change the name of an existing unit.
However, you can change the name of a unit added during suspension.
- You can change the definition of a unit that is running. However, you cannot delete it.
- Even if you change an existing definition, the past execution results remain.
- When you change an existing definition, the jobnet may execute in a different configuration from before. Be aware of this when you rerun the jobnet.
- The dummy schedule for a jobnet registered for planned execution, displayed in the Daily Schedule or Monthly Schedule window, is calculated from the changed definition information even while the jobnet is suspended.
- Deleting an existing unit
- You can delete an existing unit. However, note the following:
- When you delete an existing unit, past execution results for the unit are also deleted, and you can no longer display them. If you need this past history information, either reference the scheduler log information, or save the information using the ajsshow command, before deleting the unit. 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.
- When you delete an existing unit, the jobnet may execute in a different configuration from before. Be aware of this when you rerun the jobnet.
- Changing the map size
- You can change the map size during suspension, regardless of the status of the jobnet.
- Adding a start condition
- When you use a start condition, first you create the start condition object (.CONDITION). You then set the schedule by using schedule rules, or by temporarily changing the execution plan.
- However, the schedule is recalculated differently depending on the method of execution registration. When you add a start condition for a jobnet that did not previously have a start condition, the effect is as follows:
- When the jobnet is registered for immediate execution
Even if you add a start condition, it will not be valid.
- When the jobnet is registered for planned execution
The added start condition is valid from the next generation that is scheduled for execution.
- When the jobnet is registered for fixed execution in a specified period
Even if you add a start condition, it will not be valid.
- When the jobnet is registered for fixed execution for a specific number of future generations
The added start condition is valid from the first generation created after the suspension is released.
When you edit the definition of a jobnet that is registered for execution, the changes are reflected in the past execution results, and all running and scheduled generations. For example, if you edit the definition of a jobnet and then display the past history of the jobnet in the Jobnet Monitor window, the status for the edited jobnet is displayed.
(b) Available changes according to unit type and status
The changes you can make to the definition of a unit under a root jobnet that is registered for execution differs according to the type and status of the unit.
The following table shows the different changes you can make for each type of unit.
Table 4-9 Unit types and available editing operations
Edit operation
Unit Job Jobnet Editing a unit Adding a unit Y Y Deleting a unit Running unit N N Non-running unit Y Y Editing a relation line Adding a relation line Y Y Deleting a relation line Y Y Editing unit information Changing a unit name New unit Y Y Existing unit N N Changing a comment Y Y Changing the execution host Y Y Changing a definition Y Y Changing the transfer file Y -- Changing an attribute Type Y Y Other attribute Y Y Other Changing the map size -- Y
- Legend:
- Y : Available
- N : Not available
- -- : Not applicable
Note that the available editing options differ, depending on the status of the unit you are editing. The following table shows the different editing options available according to the status of the unit.
Table 4-10 Editing options available for units according to status
Edit operation
Unit status Waiting for prev. to end Running Ended Editing a unit Adding a unit -- -- -- Deleting a unit Y N Y Editing a relation line Adding a relation line Y Y Y Deleting a relation line Y Y Y Editing unit information Changing a unit name New unit Y -- Y Existing unit N N N Changing a comment Y Y Y Changing an execution host Y Y Y Changing a definition Y Y Y Changing the transfer file Y Y Y Changing an attribute Type Y N Y Other attribute Y Y Y Other Changing the map size (jobnet) Y Y Y
- Legend:
- Y : Available
- N : Not available
- -- : Not applicable
Table 4-11 Editing options available according to start condition status
Edit operation
Status of start condition No start condition Waiting for prev. to end Monitoring Ended Start condition Setting a start condition Y -- -- -- Deleting a start condition -- Y -- Y Editing a unit Adding a unit Y Y -- Y Deleting a unit Y Y -- Y Editing unit information Changing a unit name New unit Y Y -- Y Existing unit -- N -- N Changing a comment Y Y -- Y Changing an execution host Y Y -- Y Changing a definition Y Y -- Y Changing an attribute Y Y -- Y Other Changing the map size Y Y -- Y
- Legend:
- Y : Available
- N : Not available
- -- : Not applicable
(2) Procedure for editing definitions
The following describes how to change a definition below a registered root jobnet.
(a) Basic procedure for editing definitions
Follow this basic procedure to change a definition below a root jobnet that is registered for execution.
To change a definition below a root jobnet that is registered for execution:
- Suspend the root jobnet that is registered for execution.
- Edit the definition below the root jobnet
- Release the suspension
To edit a definition that is monitoring for a start condition, you must kill the jobs that are monitoring for a start condition before suspending the root jobnet. Follow this procedure to edit a definition that is monitoring for a start condition.
To edit a definition that is monitoring for a start condition:
- Kill the jobs that are monitoring for a start condition.
- Suspend the root jobnet.
- Edit the definition.
- Release the suspension.
- Execute the root jobnet by adding a schedule.
(b) Activating the suspend function
Before you can suspend a job or jobnet, you must activate the suspend function in advance by running the ajssetup command. For the command syntax, see ajssetup in 2. Commands Used during Setup in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
To activate the suspend function, execute the command as follows:
ajssetup -F scheduler-service-name -mAlthough you can execute the ajssetup command while the scheduler service is running, your settings take effect only after the scheduler service restarts. You should therefore restart the scheduler service after executing the ajssetup command. Use the following procedure to activate the suspend function.
To activate the suspend function:
- Disconnect JP1/AJS3 - View if it is connected.
- Stop the JP1/AJS3 service.
- Execute the command ajssetup -F scheduler-service-name -m.
- Restart the JP1/AJS3 service.
- Cautionary note
- Once you activate the suspend function using the ajssetup -m command, the setting is permanent.
(3) Suspend operations
(a) Executing the suspend function
You can suspend a root jobnet using either the JP1/AJS3 - View window or the appropriate command.
- Conditions required for suspension
- The following conditions must be met before you can suspend a root jobnet:
- The JP1/AJS3 service is running
- There are no generations monitoring for a start condition (the status of the start condition is waiting or ended)
- The user who executes the command has the required permission
- Accessing the suspend function from the JP1/AJS3 - View window
- In the JP1/AJS3 - View window, from the Operations menu choose Suspension and then Suspend.
- Accessing the suspend function using a command
- Execute the ajssuspend command, specifying the -S option.
When you execute the suspend function, you can specify whether to suspend the jobnet if a unit is executing.
(b) Checking the suspension status
To check whether the root jobnet is suspended, use the JP1/AJS3 - View window or the appropriate command.
- Using the JP1/AJS3 - View window
- An icon indicating the suspension status is displayed in the list area of the JP1/AJS3 - View window.
- Using a command
- Execute the ajsshow command with the -i option, and specify the 2-byte format indicator %SP.
- The command format is as follows.
ajsshow -i %SP- For details on the ajsshow command, see the description of ajsshow in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
You can release a suspended root jobnet using the JP1/AJS3 - View window, or an appropriate command.
- Conditions for releasing suspension
- The following conditions must be met before you can release a suspended root jobnet:
- The JP1/AJS3 service is running.
- The user has the appropriate permission to perform the operation.
- The target is not being edited exclusively elsewhere
- Releasing suspension using the JP1/AJS3 - View window
- In the JP1/AJS3 - View window, from the Operations menu choose Release Suspension.
- Releasing suspension using a command
- Execute the ajssuspend command, specifying the -C option.
If you cold-start the JP1/AJS3 service, suspension is released automatically, and execution registration is also canceled automatically.
(d) Behavior of added units after suspension is released
When you release the suspension, you can specify the behavior of units added under a running jobnet. However, this does not apply to units added under a remote jobnet.
You can specify one of the following three options. The name of the option, and the behavior of the unit after suspension is released are described in the paragraphs below.
- Execute
- This option executes the added units.
- When you release the suspension, units added directly below a running jobnet enter the Waiting for prev. to end status. These units are executed as soon as the previous unit ends. If all preceding units have already ended normally when you release the suspension, then the added units are executed immediately.
- This option is assumed if you execute the command without specifying an option.
- Do not execute (stop)
- This option cancels execution of the added units.
- When you release the suspension, execution of the units that were added directly under a running jobnet is canceled. The units then have the status Bypassed.
- Hold
- This option temporarily changes the status of the added units to Held.
- When you release the suspension, the units that were added directly under a running jobnet temporarily change to Held status.
The status of an added unit when you release the suspension with one of these options specified, depends on the status of the unit one level above the added unit. The following table shows the relationship between the status of the upper-level unit and the status of the added unit.
Table 4-12 Status of added unit when suspension is released with specified option
Status of unit one level above added unit Option Execute or no option specified Do not execute (stop) Hold Running Waiting for previous unit to end (changes to Now running when the previous unit ends normally) Bypassed Waiting for previous unit to end (changes to Being held when the previous unit ends normally) Waiting Waiting for previous unit to end Waiting for previous unit to end Waiting for previous unit to end Ended Bypassed Bypassed Bypassed
- Cautionary note
- If a unit that was added during suspension is bypassed, the plan change for that unit is set to Execution prohibited. It you need to execute the unit (by rerunning it, for example), you can add an execution schedule by changing the time (only applies if the unit is a jobnet), or releasing the changes made by the change plan.
(4) Status change of suspended jobs and jobnets
(a) Status change of suspended jobs
The status of a suspended job changes as follows:
- A job that is already running when the root jobnet is suspended continues to run. When the timeout period of the job expires, the job no longer executes. When the job finishes executing, its status changes to Ended. Delay monitoring also continues. When the delay time arrives, the job enters Delayed status, but upper-level units are not affected. The status of upper-level units changes when suspension is released. The following figure shows the suspension of a job in Now running status.
Figure 4-38 Status change of suspended job 1 (in "Now running" status)
- Units under the suspended root jobnet will not be executed again.
The following figure shows the suspension of a job in Waiting for previous to end status.
Figure 4-39 Status change of suspended job 2 (in "Waiting for previous to end" status)
(b) Status change in suspended jobnets (excluding remote jobnets)
- A jobnet (excluding remote jobnets) that has the Now running status when the root jobnet is suspended retains that status even if all lower-level units have ended. In addition, delays and timeout periods (skipping) are not monitored.
The following figure shows the suspension of a jobnet in Now running status.
Figure 4-40 Status change of suspended jobnet (in "Now running" status)
(c) Status change in suspended remote jobnets
When you suspend the root jobnet, only the status of a remote jobnet that is running changes. The statuses of succeeding jobs and upper-level units do not change.
(d) Status change when the JP1/AJS3 service is hot-started during suspension
If the JP1/AJS3 service stops while the root jobnet is suspended and is then hot-started, jobs with the Now running status continue to execute. However, the status of such jobs does not change to ended when the jobs finish executing. The status of the jobs only changes to ended when you release the suspension.
The following figure shows the status change when the JP1/AJS3 service is hot-started during suspension.
Figure 4-41 Status change when the JP1/AJS3 service is hot-started during suspension
Assume that you hot-start the JP1/AJS3 service while the root jobnet is suspended. Assume that you then add a unit as a preceding unit to a running unit, and specify the Execute option when you release suspension of the root jobnet. The status of the unit that was running changes to ended after the unit you added terminates.
The following figure shows the status change when the JP1/AJS3 service is hot-started during suspension.
Figure 4-42 Status change when the JP1/AJS3 service is hot-started during suspension (Execute option specified)
(e) Status change when the JP1/AJS3 service is warm-started during suspension
If the JP1/AJS3 service stops while the root jobnet is suspended and is then warm-started, the root jobnet maintains its suspended status. However, the status of running jobs changes to Unknown end status, the status of running jobnets changes to Interrupted, and the status of units added below a running jobnet changes to Bypassed.
An end delay is not detected if the delay monitor time is reached for a unit during suspension.
The following figure shows the status change when the JP1/AJS3 service is warm-started during suspension.
Figure 4-43 Status change when the JP1/AJS3 service is warm-started during suspension
(f) Notes on restarting the JP1/AJS3 service with a cold-start during suspension
If the JP1/AJS3 service stops while the root jobnet is suspended, and you restart it with a cold-start, the unit records deleted during the suspension remain in the database as invalid records. In such a case, execute the following command on all root jobnets to delete the invalid records.
ajssuspend -U -R -T /
(5) Scheduling after suspension is released
(a) Allocating a schedule when the suspension is released
The allocation of a schedule to a unit after the suspension is released is described below, according to the category of execution registration that applies to the unit.
- When the root jobnet is registered for immediate execution or fixed execution with a specified date
- As is normal with immediate execution registration and fixed execution registration with a specified date, the date specified in the fixed execution registration time is allocated as the scheduled start time. However, if the upper-level jobnet does not have an execution schedule (execution is prohibited), then the scheduled start time of the added jobnet becomes None, since although the scheduled start time of the added jobnet is allocated as above, the upper-level jobnet does not have a scheduled start time.
- The following example shows an example of suspending the root jobnet and adding units.
Figure 4-44 Example of adding units to a root jobnet that is registered for immediate execution
- The following table shows how the schedule is allocated after releasing suspension.
Table 4-13 Schedule after releasing suspension (for immediate execution registration and fixed execution registration with a specified date)
Unit 11/30 12/1 12/2 12/3 A -- 12:00 -- -- B -- 12:00 -- -- C -- 12:00 -- -- D -- 12:00 -- -- E -- 12:00 -- --
- Legend:
- -- : Does not apply
- When the root jobnet is registered for planned execution
- Schedules are recalculated for all jobnets in waiting generations whose root jobnet has not been rerun. If the root jobnet for a certain generation is running or rerunning, then schedules are recalculated only for the added jobnets in that generation.
- The following figure shows an example of adding units after suspending the root jobnet that is registered for planned execution.
Figure 4-45 Adding units to a root jobnet registered for planned execution
- Imagine the current date is December 1 (Friday), and you change the configuration of the application before it starts on December 1 (Friday). The application for November 30 (Thursday) is rerunning, and jobnet B is currently running. Based on this information, the following schedule is allocated after the suspension is released.
Table 4-14 Schedule after suspension is released (when registered for planned execution)
Jobnet 11/24
(Fri)11/25
(Sat)11/26
(Sun)11/27
(Mon)11/28
(Tue)11/29
(Wed)11/30
(Thu)12/1
(Fri)12/2
(Sat)A EN EN EN EN EN EN NR (WS) WS B BP BP BP BP BP BP NR (WP) NS C BP BP BP BP BP BP (WP) (WP) WP D BP BP BP BP BP BP (NS) (WP) NS E EN BP BP BP BP BP (WP) (NS) NS
- Legend:
- EN : Ended normally
- BP : Bypassed
- NR : Now running
- WS : Waiting for start time
- WP : Waiting for prev. to end
- NS : Not sched. to exe.
- ( ) : Recalculated schedule
- The schedule for November 30 is recalculated for jobnet C, and for the jobnets below jobnet C (D and E). Therefore, even if an exclusive schedule is defined for jobnet B and jobnet C, it is invalid. On December 12, the exclusive schedule is valid, since the schedule is recalculated from the uppermost jobnet.
- When the root jobnet is registered for fixed execution
- The schedule is recalculated for jobnets that were added to a jobnet whose root jobnet is either waiting or running.
- The following figure shows an example of adding units after suspending a root jobnet that is registered for fixed execution.
Figure 4-46 Adding units to a root jobnet registered for fixed execution
- Imagine the current date is December 1 (Friday), and you change the configuration of the application before it starts on December 1 (Friday). The application for November 30 (Thursday) is rerunning, and jobnet B is currently running. Based on this information, the following schedule is allocated after the suspension is released. Assume that the root jobnet is registered for fixed execution until December 6.
Table 4-15 Schedule after suspension is released (when registered for fixed execution)
Jobnet 11/29
(Wed)11/30
(Thu)12/1
(Fri)12/2
(Sat)12/3
(Sun)12/4
(Mon)12/5
(Tue)12/6
(Wed)A EN NR WS WS WS WS WS WS B BP NR WP NS NS NS NS NS C BP (WP) (WP) (WP) (WP) (WP) (WP) (WP) D BP (NS) (WP) (NS) (NS) (NS) (NS) (NS) E BP (WP) (NS) (NS) (NS) (NS) (NS) (NS)
- Legend:
- EN : Ended normally
- BP : Bypassed
- NR : Now running
- WS : Waiting for start time
- WP : Waiting for prev. to end
- NS : Not sched. to exe.
- ( ) : Recalculated schedule
- When a jobnet is registered for fixed execution over a specified period, the schedules of existing generations are not recalculated when the suspension is released. Exclusive schedules defined for the hierarchical level that contains jobnets added within the fixed period (the hierarchical level of jobnets B and C) are invalid. When a jobnet is registered for fixed execution with a specific number of future generations, the exclusive schedule is valid for generations created after the suspension is released.
(b) Execution schedules after suspension is released
When you register a jobnet for planned execution or fixed execution with a specific number of future generations, JP1/AJS3 assigns a new generation each time the jobnet is executed. Therefore, when you display past results and future plans using the Monthly Schedule or Daily Schedule window, or the ajsshow command, the execution schedules shown below are created by schedule simulation.
- When the jobnet is scheduled for planned execution:
Execution schedules are created for the generation after next, and succeeding generations.
- When the jobnet is scheduled for fixed execution with a specific number of future generations:
Execution schedules created for generations after the specified number of future generations.
Therefore, if the suspension is not released before the next scheduled execution of the root jobnet, the execution schedule of the jobnet may be affected by events like the skipping process that occurs when suspension is released. For this reason, try to ensure that the suspend operation does not last for more than one generation.
The following table shows an example of a jobnet that was registered for planned execution on June 12.
Table 4-16 Jobnet registered for planned execution on June 12
![]()
6/10 6/11 6/12 6/13 6/14 6/15 6/16 6/17 6/18 6/19 6/20 Jobnet EN EN EN SN SS SS SS SS SS SS SS
- Legend:
- EN : Ended normally
- SN : Scheduled next
- SS : Schedule simulation
The JP1/AJS3 database stores information for the above jobnet that was registered on June 12, about the generation scheduled to execute on June 13. Unless you suspend this jobnet when it finishes executing on June 12, and release the suspension only after June 14, the schedule for June 13 remains. It will then be subjected to the skipping process after the suspension is released. In this case, a Skipped so not executed generation may be created, or an execution schedule may be skipped.
(6) Inheriting macro variables when adding an event job
Macro variables are passed on to a succeeding unit when the status of the succeeding unit changes from Waiting to execute to Now running.
The following paragraphs and figures show how macro variables are inherited when you change the lower-level definitions of the root jobnet while it is registered for execution.
The way in which macro variables are inherited depends on the status of the unit that succeeds the added event job.
- When the succeeding unit is running
The following figure shows macro variable inheritance according to the status of the succeeding unit.
Figure 4-47 Adding an event job that precedes a unit that is running
When job 2 ends, job 3 waits for event job 2 to end. The value of the macro variable that jobnet 1 inherits is created when jobnet 1 changes to Now running status. In Figure 4-45, the value of the macro variable that is created before suspending the root jobnet continues to be used under jobnet 1.
- When the succeeding unit is waiting for the previous unit to end
The following figure shows macro variable inheritance according to the status of the succeeding unit.
Figure 4-48 Adding an event job that precedes a unit that is waiting for the previous unit to end
When event job 2 and event job 3 end, jobnet 1 is executed. The value of the macro variable that jobnet 1 inherits is created when jobnet 1 changes to Now running status. In Figure 4-46, the value of the macro variable that jobnet 1 inherits is obtained by merging the execution results of event job 1, the execution results of event job 2, and the execution results of event job 3 that was executed after the suspension was released.
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.