Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Automatic Job Management System 3 Overview


4.4.2 Simulation

JP1/AJS3 uses two types of simulation:

Schedule simulation and execution simulation are used to calculate the information about executed and scheduled generations appearing in the execution result list in the Daily Schedule and Monthly Schedule windows. The budget and result information output by the ajsshow command with the -b, -e, -v, or -w option specified is also calculated by schedule simulation and execution simulation. 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.

The following describes these two types of simulation.

Organization of this subsection

(1) Schedule simulation

When a jobnet is registered for execution, the finalized schedules are stored in the JP1/AJS3 database.

Jobnet registered for planned execution

Upon registration, only the first schedule is stored in the database. Thereafter, at each jobnet start time, a generation is created and its schedule is stored in the database.

Jobnet registered for fixed execution over a specified period

Only the schedules for generations within the specified period are stored in the database.

Jobnet registered for fixed execution with a specified generation count

Schedules for the specified number of generations are stored in the database. Thereafter, at each execution of the jobnet, the next generation is created and its schedule is stored in the database, so that the number of stored schedules always matches the specified number of generations.

During this process, JP1/AJS3 generates unfinalized schedules if the jobnet is registered for planned execution or for fixed execution with a specified generation count. These unfinalized schedules, or dummy schedules as they are known, are simulated from the jobnet schedule definition. Simulation of execution schedules based on a jobnet schedule definition is known as schedule simulation.

The following figure shows an example of schedule simulation for a jobnet registered for planned execution.

Figure 4‒22: Example of schedule simulation for a jobnet registered for planned execution

[Figure]

In this example, the next execution schedule due to start on 8/9 is fixed and stored in the database. The execution schedules from 8/10 onward are dummy schedules generated by schedule simulation.

The following is an example of when the ajsshow command is executed at 08:00 on August 9, 2009. The example assumes that /Net will be started at 12:00, and has been registered for planned execution.

Example:
ajsshow -i "start=%BB type=%ii %JJ" -b 2009/8/9 -e 2009/8/11 /Net
 
start=Aug  9 2009 12:00 type=planned /Net
start=Aug 10 2009 12:00 type=simulation /Net
start=Aug 11 2009 12:00 type=simulation /Net
Cases when dummy schedules cannot be scheduled

A dummy schedule is one that has not been finalized.

Under planned execution, the next schedule to be executed is finalized when the jobnet starts execution. For this reason, if the next schedule remains in Waiting for start time status or Being held status without being executed, beyond the time at which the dummy schedule was calculated, the dummy schedule cannot be scheduled. This occurs in the following cases:

  • When the JP1/AJS3 service stops

  • When a job or jobnet is held

The following figure shows an example of when a dummy schedule cannot be scheduled.

Figure 4‒23: Example case when a dummy schedule cannot be scheduled

[Figure]

In this example, the jobnet due to execute at 8:00 failed to do so because the JP1/AJS3 service was stopped at that time. It waits for the service to start, and then begins running.

Jobs will enter Now running status after service restart only if the JP1/AJS3 service is restarted in either of the following ways:

  • Hot start

  • Warm start if the jobnet was due to execute before the scheduler service is restarted, and is set to start at the same time as the scheduler service

    To specify that a jobnet that was due to execute before the scheduler service starts is to start when the scheduler service starts, specify exec (default) in the OVERSCHEDULE environment setting parameter. If you specify a value other than exec, the jobnet will be placed in Skipped so not executed status.

The schedule due to start at 9:00 (dummy schedule) will be finalized if the jobnet starts execution at 8:00. If the jobnet has not started running by 9:00, the dummy schedule will not be scheduled.

For details on dummy schedules, see 3.3.3(2) Schedule option and 4.5.3(4) Changing to a time that extends beyond the dummy schedule.

(2) Execution simulation

In addition to schedule simulation, JP1/AJS3 calculates jobnet start times and end times from their scheduled start times, the required flow of jobs defined in a jobnet, and other such information. This procedure is known as execution simulation.

In execution simulation, JP1/AJS3 simulates the scheduled start and end times of a jobnet and jobs to more closely match actual operation. The simulated times are based on various information, including the current time, scheduled start time of the jobnet, its execution status, past execution time, types of units and unit flow. If the jobnet has never been executed before, the time (in seconds) set in First execution time in the Preferences dialog box (or 60 seconds if using the ajsshow command) is taken as the required execution time of the first job defined in the jobnet. The scheduled start and end times of the jobnet and its lower units are then calculated from that assumed execution time.

In the Preferences dialog box, you can select whether to perform simulation. For details on settings in the Preferences dialog box, see 15.3.42 Preferences dialog box in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide. Note that for the ajsshow command, the settings in the Preference dialog box are not relevant.

When you choose not to perform simulation, the displayed start time is based on the jobnet's schedule rule, and the scheduled end time is calculated taking the setting in First execution time in the Preferences dialog box as the required execution time. For the jobnet's lower units, however, the jobnet's start and end times are displayed and simulation is not performed. The following figure illustrates the differences in scheduled start and end times depending on whether simulation is performed.

Figure 4‒24: Differences between start and end times depending on whether execution simulation is performed

[Figure]

In this example, assume that 1,200 seconds (default) is set in First execution time in the Preferences dialog box, and that the jobnet has never been executed since it was registered.

When execution simulation is performed, since the defined job sequence is Job1 followed by Job2, Job1's end time will be Job2's start time. Each unit is simulated using the required execution time (1,200 seconds = 20 minutes) set in First execution time. The simulated execution times will therefore be 12:00 to 12:20 for Job1, and 12:20 to 12:40 for Job2. As a result, the execution time for the "Net" jobnet consisting of Job1 and Job2 will be 12:00 to 12:40.

When simulation is not performed, the end time of the "Net" jobnet is calculated from the value set in First execution time. Because simulation is not performed for the units defined under this jobnet, the execution time is displayed as 12:00 to 12:20 for Net, Job1, and Job2 alike.

When the -b and -e options or the-v and -w options are specified, the ajsshow command always performs simulation. When the -B option or execution ID is specified, the ajsshow command does not perform simulation. The following figure shows the difference in output depending on the specified option.

Figure 4‒25: Difference in output depending on the option specified in the ajsshow option

[Figure]

In this example, it is assumed that the jobnet has not yet been executed after the jobnet was registered for execution.

When the -b and -e options or the-v and -w options are specified in the ajsshow command, because the execution of Job1 is followed by the execution of Job2, the end time of Job1 is the start time of Job2. Since the simulation assumes 60 seconds (one minute) as the first execution time of each unit, Job1 is executed from 12:00 to 12:01, and Job2 is executed from 12:01 to 12:02. Therefore, the Net jobnet that contains Job1 and Job2 is executed from 12:00 to 12:02.

The following shows usage examples of the ajsshow command. These examples assume that the command is executed at 08:00 on August 9, 2009.

Example 1
ajsshow -i "start=%BB end=%OO %JJ" -b 2009/8/9 -e 2009/8/9 -R /Net
        
start=Aug  9 2009 12:00 end=Aug  9 2009 12:02 /Net
start=Aug  9 2009 12:00 end=Aug  9 2009 12:01 /Net/job1
start=Aug  9 2009 12:01 end=Aug  9 2009 12:02 /Net/job2

When the -B option or execution ID is specified in the ajsshow command, the command calculates the end time, assuming 60 seconds (one minute) as the first execution time for the Net jobnet. However, because the command does not perform simulation for the subordinate units, the command displays 12:00 as the start time and 12:01 as the end time for the Net jobnet, as well as for both Job1 and Job2.

Example 2
ajsshow -i "start=%BB end=%OO %JJ" -B 20090809001 -R /Net
        
start=Aug  9 2009 12:00 end=Aug  9 2009 12:01 /Net
start=Aug  9 2009 12:00 end=Aug  9 2009 12:01 /Net/job1
start=Aug  9 2009 12:00 end=Aug  9 2009 12:01 /Net/job2
Supplementary notes
  • If the jobnet enters Abnormal end or Running + Abend status while execution simulation is being performed, the subsequent units will be shown as Not scheduled to execute. When execution simulation is not being performed, however, the subsequent units are shown as Waiting to execute.

  • Execution simulation is not performed in regard to the specified schedule option (Schedule skip or Multi-schedule).

  • When a jobnet has a start condition, execution simulation is not performed for a generation that will be in Wait for start condition status but has not yet been created.

  • Execution simulation is not performed for unregistered units. For details, see 6.4 Checking a defined schedule in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide.

  • When a jobnet uses a jobnet connector, execution simulation for the jobnet connector is based on its statistical information. Because statistical information is deleted when a jobnet is unregistered, if you cancel registration of either the root jobnet on the jobnet connector side or the jobnet that the connector is linked to, inconsistencies will arise in subsequent execution simulations.