Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


6.2.1 Defining variables for work paths used during job execution

You can define variables for the work paths of the following items that are displayed in the Define Details dialog box for a PC job, Unix job, HTTP connection job, or a queue job. Because specific values can be set for these variables for each agent host, the same job definition can be used to execute a job on all agent hosts.

Table 6‒11: List of job definition items for which variables can be defined

Job definition item

Whether variable can be defined

Command statement (UNIX only)

Y

File name (Windows only)

Y

Script file name (UNIX only)#

Y

Parameters

Y

Environment variables

--

Environment file

--

Working path

--

Standard input

Y

Standard output

Y

Standard error output

Y

File to transfer

--

Destination file

--

Legend:

Y: A variable can be defined for this item.

--: A variable cannot be defined for this item.

#:

The variables discussed in this subsection have no effect in a script file.

The following describes how to define variables for the work paths used during job execution.

Organization of this subsection

(1) Definition procedure

To define a variable for a job definition item:

  1. In Windows Control Panel, open the Services administrative tool, and stop the following services:

    • JP1/AJS3 service

    • JP1/AJS3 Queueless Agent service#

    #:

    This service needs to be stopped only if queueless jobs are used.

  2. Execute the following command to set the environment setting parameter described in (2) below:

    jajs_config -k definition-key "parameter-name"=value
  3. Restart the services that you stopped in step 1.

    The new settings are applied.

(2) Environment setting parameter

Table 6‒12: Environment setting parameter used to define a variable for a work path

Definition key

Environment setting parameter

Explanation

[{JP1_DEFAULT|logical-host}\JP1NBQAGENT\Variable]#

"variable-name"=

Specifies the work path for a variable name.

#:

The specification of the {JP1_DEFAULT|logical-host} part depends on whether the host is a physical host or a logical host. For a physical host, specify JP1_DEFAULT. For a logical host, specify the logical host name.

For details about the definition of this environment setting parameter, see 20.5.2(72) variable-name.

(3) Definition example

The following shows an example of specifying the job definition and commands when the prog1.exe job program is in c:\pp1\bin on the Agent1 host and in d:\pp1\bin on the Agent2 host.

With the above definition and commands, c:\pp1\bin\prog1.exe is executed on the Agent1 host and d:\pp1\bin\prog1.exe is executed on the Agent2 host.

(4) Note

Do not use a character string that begins with JP1, a character string that begins with JP1 is used by the system.