Hitachi

JP1 Version 11 Job Management: Getting Started (Scripting Language)


Preface

Organization of this preface

■ What you can do with JP1/Advanced Shell

This section describes what can be done with JP1/Advanced Shell.

Purposes of JP1/Advanced Shell

JP1/Advanced Shell is a product for improving development productivity and the operational efficiency of batch applications. It enables you to efficiently create and execute job definition scripts (shell scripts) for batch jobs.

JP1/Advanced Shell has the features described below.

Inheriting assets between the OSs of batch applications

  • Using existing assets

    You can use shell scripts created in a UNIX environment to develop job definition scripts in a Windows environment.

    Because the job definition scripts used in JP1/Advanced Shell employ language specifications that have standard shell compatibility, it is easy to learn the language and migrate from existing shell scripts.

  • Cross-platform support

    Cross-platform means applicability to multiple OS bases. This feature enables you to use cross-platform functions.

    • You can execute job definition scripts developed in a Windows environment in both Windows and UNIX environments.

    • You can use UNIX-compatible commands in both Windows and UNIX environments.

Expediting the configuration of batch applications

  • Controlling job execution

    JP1/Advanced Shell extends job definition scripts so that you can automate and concisely code processes that are used repetitiously in batch applications.

    You can reduce the volume of coding in job definition scripts and improve readability and maintainability of job definition scripts by doing the following:

    • Specifying job step execution conditions

    • Using variables that are valid in job steps

    • Outputting error messages and setting return codes when batch jobs terminate with errors

    • In the event a batch job terminates with an error, automatically terminating child processes forcibly and deleting temporary files used by the batch job

  • Using an editor to develop job definition scripts (development environment)

    In the development environment, you can use the JP1/Advanced Shell Editor (a dedicated editor with debugging functions) of the Graphical User Interface (GUI) to develop and debug job definition scripts.

    • You can execute job definition scripts in job steps, and set breakpoints.

    • You can accumulate coverage information for job definition scripts.

    The following figure shows the JP1/Advanced Shell Editor window.

    JP1/Advanced Shell Editor window

    [Figure]

  • Efficient file allocation and postprocessing

    You can automate and concisely code processes, such as checking for regular files, and allocating and deleting temporary files.

    • You can automatically allocate temporary files during batch job execution and delete them once the batch job has terminated.

    • You can check for regular files during batch job execution and perform appropriate postprocessing on files depending on job step or job processing results.

Improving serviceability and maintainability by central management of batch job execution results

Maintainability of batch applications can be improved by automatically outputting job execution logs in the event of an error and managing such logs centrally.

In conventional open systems, management of batch job execution results is complicated because the results are not stored at one central location. JP1/Advanced Shell enables you to collect batch job execution results on a spool as job execution logs, and to manage them centrally. By using JP1/AJS - View, you can execute batch jobs on a periodic basis and reference the results by automatically executing job definition scripts.

Each job's execution results are output to a spool job directory under the spool directory. The following figure illustrates central management of batch job execution results.

Central management of batch job execution results

[Figure]

For details about the output contents of the job execution logs, see 4.2.1 Job execution log.

Example of application to a business operation

You can apply JP1/Advanced Shell to the following type of business operation.

In the case of an operation that involves many transactions in an online system during the daytime and totaling of the transactions at night, you can develop and execute batch jobs that obtain totals, including sales figures, number of products sold, and inventory updates. You can also develop and execute batch jobs for obtaining rolling totals, such as daily, monthly, and term-end processing, as well as batch jobs that have specific purposes and that are used for special occasions.

The following figure shows an example of JP1/Advanced Shell operation (for obtaining daily operation totals)

Example of JP1/Advanced Shell operation (obtaining daily operation totals)

[Figure]

To run JP1/Advanced Shell:

  1. Start daily operation and perform transactions involving products.

  2. The open infrastructure product updates the various sales data.

  3. Daily operation ends and JP1/AJS issues instructions to execute job definition scripts automatically at specified times.

  4. JP1/Advanced Shell executes job definition scripts to process the various sales data.

  5. JP1/Advanced Shell outputs the execution results of the job definition scripts.

  6. The manager can obtain information, including totals and changes in product sales, based on the execution results.

■ What is explained in this manual

This manual describes the basic way to set up and operate JP1/Advanced Shell. The purpose of this manual is to help the readers understand the concept of JP1/Advanced Shell and the basic way to use it.

This manual is intended for the following persons:

JP1/Advanced Shell consists of the following products:

The basic guide provides information about JP1/Advanced Shell.

This manual assumes that the system configuration shown below is used. For operations in any other configuration, see the description of system configurations in the manual JP1/Advanced Shell.

[Figure]

The following describes the role of each system component:

■ How to read this manual

In addition to this basic guide, you can use the JP1/Advanced Shell manual JP1/Advanced Shell . This manual provides details about the system configuration setup and operation procedures which are not covered in the basic guide, and reference information such as commands and messages.

This manual describes the procedures for Windows and for Linux separately. In the description of a UNIX environment, replace "UNIX" with "Linux" except for "UNIX-compatible commands" and "UNIX jobs", which can be used as they are because they are function names.

A reference to another manual is written as follows: For details about something, see topic-title in the manual-name. Using topic-title as a keyword, search for the relevant section in the target manual.

Some windows in this manual might differ from the windows of your product because of improvements made without prior notice.