Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


3.2.1 Starting jobs by using JP1/AJS from the execution environment

This subsection explains how to start JP1/Advanced Shell's batch job applications by using JP1/AJS from the execution environment.

For details about using JP1/AJS for automation of batch job applications, see the applicable JP1/AJS manual. For details about how to define and execute JP1/Advanced Shell jobs in jobnets, see 2.7.2 Defining and executing a jobnet.

When you automate batch job applications, you can reduce costs as well as run your system more securely with a smaller staff. JP1/AJS is a product for automating standard batch job applications. JP1/AJS can also automate a combination of complex batch job applications. Using JP1/Advanced Shell together with JP1/AJS operations provides the following advantages:

To use JP1/AJS to execute batch job applications automatically, you must define the following:

The following figure provides an overview of using JP1/AJS to automate batch job applications. The numbers in the figure correspond to the numbers in the explanation that follows.

Figure 3‒1: Overview of using JP1/AJS to automate batch job applications

[Figure]

  1. Registers the batch job application content and execution order, and the application schedule.

  2. The batch application is executed automatically according to the registered schedule.

Organization of this subsection

(1) Defining batch job applications and their execution order

Many applications are executed at a specified time in a specified order.

For example, totaling of sales slips is executed in the following order:

  1. Extract data from the database.

  2. Sort data.

  3. Output to printer.

Steps 1 through 3 can be automated as a job controller's job step by defining these steps in a job definition script file, but the task of extracting data from the database at 12:00 cannot be automated. To define batch job applications and their execution order in JP1/Advanced Shell and JP1/AJS, define in the job controller the series of steps that make up the applications and then define the relationships among the definitions of the individual batch job applications and their execution order as the JP1/AJS execution order or execution time.

If batch job applications are broken up into task units, such as commands, application programs, or job definition scripts, JP1/AJS alone can achieve jobs equivalent to those that can be achieved by JP1/Advanced Shell. They are also called jobs in JP1/AJS.

When batch job applications and execution orders are defined in JP1/Advanced Shell and JP1/AJS, the batch job execution orders are defined by using jobnets in JP1/AJS.

The following figure shows a jobnet used when batch job applications and their execution order are defined in JP1/Advanced Shell and JP1/AJS.

Figure 3‒2: Jobnet used to define batch job applications and their execution order in JP1/Advanced Shell and JP1/AJS

[Figure]

Explanation

The following explains the execution order of the batch jobs that are defined by using JP1/AJS jobnet.

  • When batch job A terminates, batch job E is executed.

  • When batch jobs A and B terminate, batch job C is executed.

  • When batch job C terminates, batch jobs D and G are executed.

  • When batch job B terminates, batch job F is executed.

(2) Defining the definition schedule of batch job applications and their execution order

To automatically define a definition schedule for multiple batch job applications and their execution order, you need a schedule definition that determines when this definition is to be executed.

JP1/AJS's schedule definition contains such information as a calendar that specifies the company's business days and holidays, the date and time execution is to begin, and an execution interval. Based on this definition, JP1/AJS determines the execution schedule and automatically starts JP1/Advanced Shell's job execution on the specified date and time.

(3) Registering the timing of starting batch job applications

You can register an event, such as when a file is created or when some specific event occurs, as the timing for starting a batch job application. If you have registered the required information, you can start a batch job application at a specified time as well as whenever some specified event (such as creation of a file) occurs.