Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Configuration) Guide


7.1.2 Setup for using QUEUE jobs and submit jobs

Organization of this subsection

(1) Setting the execution environment for QUEUE jobs and submit jobs

By default, the execution environment for QUEUE jobs and submit jobs is created on the local host as the execution agent. However, depending on your system requirements, you might need to change the job execution environment (by adding configuration definition information to the job execution environment).

The job execution environment needs to be changed when:

If you need to change the execution environment for QUEUE jobs and submit jobs, add configuration definition information about the execution hosts (agents), queues, or execution-locked resources, using either of the following methods:

These two methods are described below.

(a) Changing the execution environment for QUEUE jobs and submit jobs using a batch file

The following describes how to change the execution environment for QUEUE jobs and submit jobs using the jpqimport command. Recreate the execution environment database as follows:

  1. Copy jpqsetup.conf (execution environment configuration definition file for QUEUE jobs and submit jobs), open the copied file in an editor, and then define the queues and agents.

    The following are the paths for saving the execution environment configuration definition file for QUEUE jobs and submit jobs:

    • In Windows

      Physical host

      JP1/AJS3 - Manager -installation-folder\conf\jpqsetup.conf

      Logical host

      shared-folder\jp1ajs2\conf\jpqsetup.conf

    • In UNIX

      Physical host

      /etc/opt/jp1ajs2/conf/jpqsetup.conf

      Logical host

      shared-directory/jp1ajs2/conf/jpqsetup.conf

    For details about the contents to write in this file, see jpqimport in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

    A coding example is shown below:

    Figure 7‒5: Example of an execution environment configuration definition file for QUEUE jobs and submit jobs

    [Figure]

  2. Save the file you have edited.

  3. Delete all files and temporary files from the database directory of the execution environment for QUEUE jobs and submit jobs.

    Stop the JP1/AJS3 service, and then delete the files using the following commands:

    • In Windows:

      del database-directory-for-QUEUE-and-submit-jobs\*#1

      del work-directory-for-manager-process-for-QUEUE-and-submit-jobs\M_JPQ*#2

    • In UNIX:

      rm database-directory-for-QUEUE-and-submit-jobs/*#1

      rm work-directory-for-manager-process-for-QUEUE-and-submit-jobs/M_JPQ*#2

    #1

    The database directory of the execution environment for QUEUE jobs and submit jobs is the folder specified in the environment setting parameter DatabasePath in [{JP1_DEFAULT|logical-host-name}\JP1NBQMANAGER\Database]. For details about the DatabasePath environment setting parameter, see 20.5.2(3) DatabasePath in the JP1/Automatic Job Management System 3 Configuration Guide.

    #2

    The work directory used by the manager process in the execution environment for QUEUE jobs and submit jobs is the folder specified in the environment setting parameter WorkPath in [{JP1_DEFAULT|logical-host-name}\JP1NBQMANAGER\Process]. For details about the WorkPath environment setting parameter, see 20.5.2(1) WorkPath (for manager process) in the JP1/Automatic Job Management System 3 Configuration Guide.

  4. Execute the jpqimport command.

    The database is re-created, and the execution environment for QUEUE jobs and submit jobs is set up.

    For the jpqimport command syntax and notes, see jpqimport in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

(b) Changing the execution environment for QUEUE jobs and submit jobs dynamically

Using commands such as jpqagtadd and jpqqueadd, you can add, delete, or change agents and queues while JP1/AJS3 is running. To add configuration definition information about the execution environment for QUEUE jobs and submit jobs dynamically, use the jpqagtadd, jpqqueadd, or jpqresadd command. To change the information dynamically, use the jpqagtalt or jpqquealt command. For the syntax of each command, see 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

To add execution hosts (agents) using the jpqagtadd command, follow these steps:

  1. Add an agent and set the maximum number of jobs it can execute concurrently.

    Make sure that the host name of the agent you are adding can be resolved to an IP address. If you do not specify the maximum number of concurrent jobs, the default is 00:00-00:00=0 (no concurrent jobs, 24 hours a day). That is, no jobs can be executed. To enable jobs to be executed by the new agent, specify 1 or higher, or change the maximum number of concurrent jobs afterwards using the jpqagtalt command. For an example of specifying the maximum number of concurrent jobs in the command's -cp option, see the notes following jpqagtalt in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

    jpqagtadd -ah agent-host-name -cp maximum-number-of-concurrent-jobs
  2. Open the entrance to the default queue.

    When you create an agent, a default queue of the same name is created automatically. The entrance to the queue is closed immediately after an agent is added by the jpqagtadd command. You must therefore open the queue using the jpqqueopen command.

    jpqqueopen -ah agent-host-name -en
  3. Change the maximum number of jobs and the warning value for the default queue.

    By default, the maximum number of jobs and warning value for a queue is set as 4,294,967,295. There is no need to change this value unless you need to limit the number of jobs being executed.

    jpqquealt -ah agent-host-name -mj maximum-number-of-jobs -wj job-count-warning-value
  4. Connect another agent to the queue and define its priority.

    The agent you added with the jpqagtadd command is connected to the default queue. Change the settings if you want to connect another agent to this queue to share the job processing. By connecting multiple agents and specifying their priorities, you can distribute jobs among the agents according to their specified priorities.

    jpqagtlink -ah agent-host-name -lh additional-agent-host-name -clp priority-of-additional-agent-host
  5. Check the settings.

    Execute the jpqagtshow and jpqqueshow commands to make sure that the settings you performed in steps 1 to 4 are correct.

    jpqagtshow -ah agent-host-name
     
    jpqqueshow -ah agent-host-name

(2) Setting up the function for automatically reorganizing ISAM files (Windows host)

You can set up JP1/AJS3 - Manager so that the data files used by the physical host and logical hosts are automatically reorganized when the JP1/AJS3 service starts. This ISAM reorganization function is disabled by default at installation time.

To enable the ISAM reorganization function, copy the file jp1ajs_spmd_pre.conf.model, located in the environment-settings file storage folder, to the file jp1ajs_spmd_pre.conf in the same folder. Set the file's access permission so that it can be read with the JP1/AJS3 service account. The environmental setting file storage folders are as follows:

With the ISAM reorganization function enabled, when the JP1/AJS3 service starts, the batch file jpqautocond.bat in the folder JP1/AJS3-Manager-installation-folder\bin also starts. This batch file reorganizes the data files in the execution environment for QUEUE jobs and submit jobs.

The following message is output to the integrated trace log when the automatic reorganization of the ISAM files ends:

Cautionary note

To reorganize ISAM files, disk space equivalent to about twice the size of the largest ISAM file in the execution environment for QUEUE jobs and submit jobs must be available on the drive containing the work directory for the physical host or logical host (work directory for manager process execution, specified in the environment setting parameter WorkPath).

In addition, free space of about the same size as the largest of the ISAM files is required on the drive containing the database directory of the execution environment for QUEUE jobs and submit jobs.

Supplementary note

jpqautocond.bat executes a number of processes. It checks the validity of the ISAM files to be reorganized and ensures they can be recovered if reorganization fails (Jischk). It then extracts the data from each ISAM file to a work file (Jisext), recreates the file (Jisconv), and renames the file as the master file. If an error occurs in any of these processes, an error message is output to the reorganization log file shown below. Take corrective action, as indicated in the message.

For Windows Server 2012 or Windows Server 2008, if the installation folder is the default installation folder or is in a folder protected by the system:

Physical host:

%ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2\log\jpqautocond[file-number].log

Logical host:

%ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2\log\jpqautocond_[logical-host-name][file-number].log

The default %ALLUSERSPROFILE% value is system-drive\ProgramData.

A folder protected by the system is the path to a folder in any of the following:

- system-drive\Windows

- system-drive\Program Files

- system-drive\Program Files (x86)

For Windows Server 2012 or Windows Server 2008, if the installation folder is other than the above:

Physical host:

JP1/AJS3-Manager-installation-folder\log\jpqautocond[file-number].log

Logical host:

JP1/AJS3-Manager-installation-folder\log\jpqautocond_[logical-host-name][file-number].log

file-number is a number between 1 and 4, representing the log file name.

When all four log files are full, they are reused, starting from the oldest file.

(3) Setting up the function for automatically reorganizing ISAM files (UNIX host)

You can set up JP1/AJS3 - Manager so that the data files used by the physical host and logical hosts are automatically reorganized when the JP1/AJS3 service starts. This ISAM reorganization function is disabled by default at installation time.

To enable the ISAM reorganization function, copy the file jp1ajs_spmd_pre.conf.model, located in the directory for environment settings files, to the file jp1ajs_spmd_pre.conf in the same directory. The environmental setting file storage directories are as follows:

With the ISAM reorganization function enabled, jpqautocond in the /opt/jp1ajs2/bin directory is activated. This script reorganizes the data files in the execution environment for QUEUE jobs and submit jobs.

The following message is output to the integrated trace log when the automatic reorganization of the ISAM files ends:

Cautionary note

To reorganize ISAM files, disk space equivalent to about twice the size of the largest ISAM file in the execution environment for QUEUE jobs and submit jobs must be available in the partition containing the work directory for the physical host or logical host (work directory for execution of the manager process, specified in the environment setting parameter WorkPath).

In addition, free space of about the same size as the largest of the ISAM files is required in the partition containing the database directory of the execution environment for QUEUE jobs and submit jobs.

Supplementary note

The jpqautocond script executes a number of processes. It checks the validity of the ISAM files to be reorganized and ensures they can be recovered if reorganization fails (Jischk). It then extracts the data from each ISAM file to a work file (Jisext), recreates the file (Jisconv), and renames the file as the master file. If an error occurs in any of these processes, an error message is output to the reorganization log file shown below. Take corrective action, as indicated in the message.

Physical host

Error messages are output to the following log file:

/var/opt/jp1ajs2/log/schedule/jpqautocond[file-number].log

file-number is a number between 1 and 4, representing the log file name.

When all four log files are full, they are reused, starting from the oldest file.

Logical host

Error messages are output to the following log file:

/var/opt/jp1ajs2/log/schedule/jpqautocond_[logical-host-name][file-number].log

file-number is a number between 1 and 4, representing the log file name.

When all four log files are full, they are reused, starting from the oldest file.

(4) Restricting JP1/AJS3 - Manager to the registration and operation of submit jobs (Windows host)

JP1/AJS3 - Manager can be restricted solely to the registration and operation of submit jobs by job execution control commands, rather than the performance of job operations based on jobnets. To use JP1/AJS3 - Manager in this way, you must change the following JP1/AJS3 definition files:

To edit these definition files:

  1. From Administration Tools in the Windows Control Panel, choose Services and stop the following service:

    • JP1/AJS3 service

  2. Using a text editor such as Notepad, edit the following files.

    (1) Edit JP1/AJS3-installation-folder\conf\jp1ajs_spmd.conf so that it contains the following lines only:

    jajs_hstd|jajs_hstd.exe|||1800|
    jajs_agtd|jajs_agtd.exe|||1800|

    (2) Change the following line in JP1/AJS3-installation-folder\conf\jp1ajs_service_0700.conf.

    Change from:

    jajs_hstd|jajs_hstd.exe||0|3|3|21600|0|0|jajs_dbmd|1|||||||

    Change to:

    jajs_hstd|jajs_hstd.exe||0|3|3|21600|0|0||1|||||||

    (3) Edit JP1/AJS3-installation-folder\conf\jp1ajs_hstd.conf so that it contains the following lines only:

    network|ajsnetwd.exe|||1800|
    submitqueue|jpqman.exe|||1800|

    (4) Change the following lines in JP1/AJS3-installation-folder\conf\jp1ajs_hstd_0700.conf.

    Change from:

    network|ajsnetwd.exe||0|3|3|21600|0|0|ajsinetd|1|||||||
    submitqueue|jpqman.exe||0|3|3|21600|0|0|agentm|1|||||||

    Change to:

    network|ajsnetwd.exe||0|3|3|21600|0|0||1|||||||
    submitqueue|jpqman.exe||0|3|3|21600|0|0|network|1|||||||

    (5) Edit JP1/AJS3-installation-folder\conf\jp1ajs_agtd.conf so that it contains the following line only:

    queuea|jpqmon.exe|||1800|

When writing these parameters, do not create any blank lines (or lines of spaces only).

(5) Restricting JP1/AJS3 - Manager to the registration and operation of submit jobs (UNIX host)

JP1/AJS3 - Manager can be restricted solely to the registration and operation of submit jobs by job execution control commands, rather than the performance of job operations based on jobnets. To use JP1/AJS3 - Manager in this way, you must change the following JP1/AJS3 definition files:

To edit these definition files:

  1. Stop JP1/AJS3.

    Execute the following commands to stop the JP1/AJS3 processes and to check that all processes have stopped:

    # /etc/opt/jp1ajs2/jajs_stop
    # /opt/jp1ajs2/bin/jajs_spmd_status
  2. Using a text editor such as vi, edit the following files.

    (1) Edit /etc/opt/jp1ajs2/conf/jp1ajs_spmd.conf so that it contains the following lines only:

    jajs_hstd|/opt/jp1ajs2/bin/jajs_hstd|||1800|
    jajs_agtd|/opt/jp1ajs2/bin/jajs_agtd|||1800|

    (2) Change the following line in /etc/opt/jp1ajs2/conf/jp1ajs_service_0700.conf.

    Change from:

    jajs_hstd|/opt/jp1ajs2/bin/jajs_hstd||0|3|3|21600|0|0|jajs_dbmd|1|||||||

    Change to:

    jajs_hstd|/opt/jp1ajs2/bin/jajs_hstd||0|3|3|21600|0|0||1|||||||

    (3) Edit /etc/opt/jp1ajs2/conf/jp1ajs_hstd.conf so that it contains the following lines only:

    ajsnetwd|/opt/jp1ajs2/bin/ajsnetwd|||1800|
    jpqman_hst|/opt/jp1ajs2/bin/jpqman|||1800|

    (4) Change the following line in /etc/opt/jp1ajs2/conf/jp1ajs_hstd_0700.conf.

    Change from:

    ajsnetwd|/opt/jp1ajs2/bin/ajsnetwd||1|3|3|21600|0|0|ajsinetd|1|||||||
    jpqman_hst|/opt/jp1ajs2/bin/jpqman||0|3|3|21600|0|0|ajsagtmd|1|||||||

    Change to:

    ajsnetwd|/opt/jp1ajs2/bin/ajsnetwd||1|3|3|21600|0|0||1|||||||
    jpqman_hst|/opt/jp1ajs2/bin/jpqman||0|3|3|21600|0|0|ajsnetwd|1|||||||

    (5) Edit /etc/opt/jp1ajs2/conf/jp1ajs_agtd.conf so that it contains the following line only:

    jpqmon|/opt/jp1ajs2/bin/jpqmon|||1800|
  3. Restart JP1/AJS3.

When writing these parameters, do not create any blank lines (or lines of spaces only).