Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Operator's Guide


12.4.6 Define Details - [UNIX Job] dialog box

The Define Details - [UNIX Job] dialog box defines the details of a Unix job.

This dialog box contains the items displayed in common, and also contains the following pages:

Organization of this subsection

(1) Items displayed in common

The following figure shows the items displayed in common.

Figure 12‒100: Items displayed in common in the Define Details - [UNIX Job] dialog box

[Figure]

The following explains the displayed items.

Unit name

Specify a unit name. Use a character string of up to 30 bytes. The default is Unix-Job.

Comment

Specify a comment for the unit. Use a character string of up to 80 bytes. The default is a blank.

Exec-agent

Specify the execution agent name or execution agent group name to be assigned the task of Unix job execution. Use a character string of up to 255 bytes. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

This item appears as a text box when either of the following applies:

  • The version of JP1/AJS - View or the connection-target JP1/AJS - Manager is earlier than 09-50

  • The unit is being defined under a remote jobnet

Otherwise, this item appears as a combo box in which you can select an execution agent. You can also directly enter an execution agent name into the combo box. The content of the list component of the combo box differs depending on whether execution agent profiles are enabled, and the contents of those profiles.

When execution agent profiles are disabled

The list is empty.

When execution agent profiles are enabled
  • If the specified job is associated with an execution agent profile

    The list displays the execution agents permitted for the specified job.

  • If the specified job is not associated with an execution agent profile

    If the upper-level unit is associated with an execution agent profile, the list displays the execution agents permitted for the upper-level unit.

    If the upper-level unit is not associated with an execution agent profile, the list will be empty.

For details about execution agents, see 5.1.1 Execution agents in the manual JP1/Automatic Job Management System 3 Overview.

Cautionary notes
  • If you have selected Queueless Agent in Exec. service on the Attributes page, specify the name of an execution host.

  • When you copy and paste a cell in Excel, a space may be appended to the end of the pasted text. In such a case, delete the space.

(2) Definition page

The following figure shows the Definition page in the Define Details - [UNIX Job] dialog box.

Figure 12‒101: Definition page in the Define Details - [UNIX Job] dialog box

[Figure]

The following explains the displayed items.

Command statement

Specify the contents of a script file. Use a character string of up to 1,023 bytes. You can use a macro variable. The default is a blank. If the script file name contains any blanks, they must be enclosed in double quotation marks (").

If you omit both of Command statement and Script file name, the system executes an empty job, then ends normally.

If you specify a statement in Command statement and a file name in Script file name, the command statement and the script file are executed in this order.

Note that the parameter you specify in Parameters is not valid in the command or script file specified in Command statement. The parameter you specify in Parameters is valid only in the script file specified in Script file name.

Script file name

Specify the name of the script file on the agent host to be run. Use a character string of up to 511 bytes. Specify an absolute path name, or a path name relative to the working path used at the time of job execution or the path specified by the PATH environment variable. If the execution destination service is Standard, the PATH environment variable of the OS user that executes the jobs takes effect. If the execution destination service is Queueless Agent, the PATH environment variable used at start of the queueless agent service takes effect. You can use a macro variable. The default is a blank.

If the execution destination service is Queueless Agent, you must prefix the script file name with ./ to specify a script file in the working path by a relative path. However, you can omit the ./ if you specify yes for the AJSQL_EXECCURRENTSCRIPT environment setting parameter. For details, see 20.10.2(6) AJSQL_EXECCURRENTSCRIPT in the JP1/Automatic Job Management System 3 Configuration Guide.

If you omit both of Command statement and Script file name, the system executes an empty job, then ends normally.

If you specify a statement in Command statement and a file name in Script file name, the command statement and the script file are executed in this order.

When all of the following conditions are satisfied, an OS user can execute a job without having execution permission for the script file:

  • The execution destination service is Queueless Agent

  • The Command statement and Parameters fields are empty

  • The OS user who executes the job has read privileges for the script file

Parameters

Specify job parameters. Use a character string of up to 1,023 bytes. You can use a macro variable. The default is a blank.

The parameters you specify here are valid only for the script file specified for Script file name. It has no effect on the commands and script files specified for Command statement.

Environment variables

The environment variables that are set in the local login script for users of the operating system become valid at the time of job execution. You can add new variables to the environment for job execution. Use a character string of up to 20,479 bytes as the name of a new environment variable. You can also use a macro variable. The default is a blank.

For notes on defining environment variables see A. Notes on Defining Environment Variables and an Environment Variable File in the manual JP1/Automatic Job Management System 3 Command Reference.

Environment file

The environment variables that are set in the local login script for users of the operating system become valid at the time of job execution. You can add new variables to the environment for job execution. Use a character string of up to 511 bytes as the name of an environment file on the agent host. You can specify an absolute path name, or a path name relative to the working path used at the time of job execution. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

For notes on defining environment variables see A. Notes on Defining Environment Variables and an Environment Variable File in the manual JP1/Automatic Job Management System 3 Command Reference.

Working path

For job execution, specify the working (current) path name. Use a character string of up to 511 bytes. Specify the working (current) path as a full path. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

By default, the working path is the home directory for users of job execution. If the user's home directory is not defined, the root directory (/) is assumed.

Supplementary note

The working path is set as the current directory for executing a job. In the working path, a temporary work file is generated for executing a job. The work file may remain undeleted in this directory after a job process was terminated abnormally during job execution. You can remove this file while JP1/AJS3 is not running.

Priority

Select the priority of job execution. You can set None or 1 to 5. The highest priority is 5. The default is None.

When None is selected, the priority depends on the definition of the upper-level jobnet. If None is selected here when None is specified for all upper-level jobnets up to the highest-level jobnet, the priority value specified for the DEFAULTPRIORITY environment setting parameter is assumed. If the DEFAULTPRIORITY environment setting parameter is not set, 1 is assumed. For details about how to specify the environment setting parameter DEFAULTPRIORITY, see 20.4.2(108) DEFAULTPRIORITY in the JP1/Automatic Job Management System 3 Configuration Guide.

Note that, when the target host is a UNIX machine, if a user who is not logged in as a superuser attempts to execute the jobs resulting from mapping and 4 or 5 is set, a runtime privilege error occurs.

The following gives the values you can specify, and their meanings.

Table 12‒40: Specifiable values and execution priority

Specifiable values

Execution priority

1

nice value +20

2

nice value +10

3

nice value

4

nice value -10

5

nice value -20

In UNIX, JP1/AJS3 service's nice value used when jajs_spmd is executed is used as the default (base) nice value. When the JP1/AJS3 service's nice value has not been set, 20 is assumed as the nice value.

For example, when the priority setting is 1 and the nice value is 20, the priority value is calculated as shown below.

39 [Figure] 20 (initial value) + 20 (increment)

If the resulting value is not within the possible nice value range (0-39), the maximum value is 39 and the minimum value is 0.

If Queueless Agent is selected as the execution service, you can set only 39, 30, 20, 10, or 0 as a nice value, according to the job execution priority (0 corresponds to the highest execution priority). When you change the nice value, you must specify the job execution priority corresponding to the nice value.

Standard input

Specify the name of the standard input file on the agent host used for job execution. Use a character string of up to 511 bytes. You can specify an absolute path name or a relative path name from the working path for job execution. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

If a file of several megabytes is transferred either during job registration or as the result of job information collection, the transfer may fail or take time.

Standard output

Specify the name of the standard output file on the agent host used for job execution. Use a character string of up to 511 bytes. You can specify an absolute path name or a relative path name from the working path for job execution. You can use macro variables and $JP1AJS2_JPQSTDOUTTEMP$ in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank. If you select Append, the standard output file is added.

If you specify $JP1AJS2_JPQSTDOUTTEMP$, the standard output file is a temporary file. In this case, the Append text box is ignored.

If a file of several megabytes is transferred either during job registration or as the result of job information collection, the transfer may fail or take time.

For notes on defining the standard output file name, see 7.10.1 Notes on the standard output file and standard error output file in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

Standard error

Specify the name of the standard error output file on the agent host used for job execution. Use a character string of up to 511 bytes. You can specify an absolute path name or a relative path name from the working path for job execution. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank. If you select Append, the standard error output file is added.

If a file of several megabytes is transferred either during job registration or as the result of job information collection, the transfer may fail or take time.

The default mode also creates a result file temporarily on the agent host, and transfers it to the manager host when the job terminates. This file is deleted from the agent host when the job terminates, and is deleted from the manager host when job information is deleted. Assign /dev/null if any reference to the details of execution results is unnecessary and you do not want to output unnecessary files.

For notes on defining the standard error output file name, see 7.10.1 Notes on the standard output file and standard error output file in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

End judgment

Select conditions for end judgment.

Rule

The displayed items vary depending on the rule selected in the Rule drop-down list. In the initial status, Judgment by threshold is selected and the thresholds for the Warning and Abnormal levels are displayed. You can select one of the following rules for end judgment.

  • Always normal

    Always terminates the Unix job normally. You can specify neither Warning nor Abnormal.

  • Always abnormal

    Always terminates the Unix job abnormally. You can specify neither Warning nor Abnormal.

  • Normal if specified file exists

    Ends normally the Unix job if the agent host contains the file specified in the File name text box that appears below the Rule drop-down list. You can use a character string of up to 511 bytes to specify a file. You can specify an absolute path name or a relative path name from the working path for job execution. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

  • Normal if file was updated

    Ends normally the Unix job if the agent host's file specified in the File name text box that appears below the Rule drop-down list is updated within the period from the job start to the job end. You can use a character string of up to 511 bytes to specify a file. You can specify an absolute path name or a relative path name from the working path for job execution. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

    The system uses the update time to determine whether a file was updated. Because the system truncates the timestamp to the second when making this determination, it might not recognize that a file has been updated when there is less than one second between updates. In this case, the job will terminate abnormally.

  • Judgment by threshold

    Define reference values for the normal end and the warning end, or for the normal end and the abnormal end. In the Warning and Abnormal text boxes, you can set 0 to 2,147,483,647. The default is a blank for Warning, and 0 for Abnormal.

    By default, the system assumes an abnormal end if the return code is other than zero. If you set Warning, the system assumes a normal end if the return code is from zero to the value of Warning. It assumes warning end if the return code is larger than the value of Warning. If you set Abnormal, the system assumes a normal end if the return code is from zero to the value of Abnormal. It assumes an abnormal end if the return code is not larger than -1 or larger than the value of Abnormal. If you specify both Warning and Abnormal, the system assumes as follows:

    Normal end: The return code is from zero to the Warning value.

    Warning end: The return code is larger than the Warning value but not larger than the Abnormal value.

    Abnormal end: The return code is not larger than -1 or larger than the Abnormal value.

    In UNIX, the return codes only have positive values from 0 to 255.

    If the program exits with a negative value, the return code is assumed to be 256 + (exit code). For example, if the program exists with -1, the system assumes 256 - 1 = 255.

Retry on abnormal end

Select whether to retry execution when the program ends in an error.

You can select this option when all of the following conditions are met:

  • The version of the connection-target JP1/AJS3 - Manager is 10-00 or later

  • The database of the connection-target JP1/AJS3 - Manager is a standard configuration

  • Judgment by threshold is selected in the Rule drop-down list

You can specify No or Yes. The default is No.

This item is displayed in JP1/AJS3 - View version 10-00 and later.

Return code

If Yes is selected for Retry on abnormal end, specify the range of return codes for which to retry jobs.

  • Greater than or equal to

    Specify the lowest return code for jobs that are to be retried. A job is retried when its return code is greater than or equal to this value.

    You can specify a value in the range from 1 to 4,294,967,295. The default is a blank. If you omit this setting, a value one greater than the value specified in Abnormal is used.

  • Less than or equal to

    Specify the highest return code for jobs that are to be retried. A job is retried when its return code is less than or equal to this value.

    You can specify a value in the range from 1 to 4,294,967,295. The default is a blank. If you omit this setting, 4,294,967,295 is used.

This item is displayed in JP1/AJS3 - View version 10-00 and later.

Maximum retry times

When Yes is selected for Retry on abnormal end, specify the maximum number of times a job can be retried. You can specify a value in the range from 1 to 12. The default is 1.

This item is displayed in JP1/AJS3 - View version 10-00 and later.

Retry interval

When Yes is selected for Retry on abnormal end, specify how long the system waits between the error occurring and retrying the job. You can specify a value in the range from 1 to 10 (minutes). The default is 1.

This item is displayed in JP1/AJS3 - View version 10-00 and later.

User name

Specify the OS user name of JP1/AJS3 - Agent that executes the job. Use a character string of up to 63 bytes. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

You must map this user name to User who registered or User who owns in Executed by. However, if the execution-user fixing function is configured for the upper-level unit, you must map this user name to a fixed user regardless of the contents of the Executed by field.

By default, the job is executed under the primary user name in the user mapping. If the home directory of the OS user you want to map has not been created, you must create it. The home directory is required for successful execution of the job. For details about the user mapping, see the JP1/Base User's Guide.

Important

In Standard input, Standard output, or Standard error, you can specify only a text file.

(3) Transfer File page

The Transfer File page in the Define Details - [UNIX Job] dialog box defines settings for transferring a file required to execute a job from JP1/AJS3 - Manager to JP1/AJS3 - Agent. You can transfer only text-format files.

The following figure shows the Transfer File page in the Define Details - [UNIX Job] dialog box.

Figure 12‒102: Transfer File page in the Define Details - [UNIX Job] dialog box

[Figure]

The following explains the displayed items.

Transfer file 1 - Transfer file 4

You can set up to four transfer files for one job.

File to transfer

Specify a file in JP1/AJS3 - Manager. Use a character string of up to 511 bytes. Specify a full path file name. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

If a file of several megabytes is transferred either during job registration or as the result of job information collection, the transfer may fail or take time.

Destination file

Specify the name of the file to be transferred to the agent host. Use a character string of up to 511 bytes. Specify a full path file name. You can specify a macro variable in this field if the version of the connection-target JP1/AJS3 - Manager is 09-50 or later, and Standard is specified for Exec. service. The default is a blank.

This specification is optional.

If you want to use the files created at the destination at the time the job is executed, specify the $JP1AJS2_JPQTEMPxx$ variable by using a script file or a parameter.

Only when a file is specified for File to transfer is a number (01 to 04, in ascending order) assigned to xx in this variable.

For example, you might specify the following:

Transfer file 1

File to transfer: Not specified

Destination file: Not specified

Transfer file 2

File to transfer: Specified

Destination file: Specified

Transfer file 3

File to transfer: Not specified

Destination file: Not specified

Transfer file 4

File to transfer: Specified

Destination file: Not specified

In this case, $JP1AJS2_JPQTEMP01$ is assigned as the destination file for transfer file 2, and $JP1AJS2_JPQTEMP02$ is assigned as the definition file for transfer file 4.

Delete of job end

To delete a transferred file after the end of job execution, select Yes. By default, this box is not selected.

If the source file name is specified but the destination file name is omitted, the system assumes that Yes is selected.

Cautionary note

JP1/AJS3 transfers transfer files from the manager host to the agent host. It also transfers result files (standard output files and standard error output files) from the agent host to the manager host. When files are transferred, each file is converted into the character code set that the JP1/AJS3 service on the destination host is using. Therefore, you must ensure that the character code set that the files use and the character code set that JP1/AJS3 uses are identical.

  • For transfer files

    When you specify transfer files for a Unix job, make sure that the character code set for the JP1/AJS3 service at the manager host is identical to the character code set for the source files. When you specify transfer files for a job for submitting jpqjobsub and other commands, make sure that the character code set for the command execution process is identical to the character code set for the source file.

  • For result files

    You must make sure that the character code set for job-generated result files is identical to that for the JP1/AJS3 service at the agent host.

For example, if the JP1/AJS3 service on the manager host is started using Japanese Shift JIS and the JP1/AJS3 service on the agent host is started using Japanese EUC, then if you transfer files encoded in Japanese Shift JIS from the manager host to the agent host, the destination files are created with Japanese EUC encoding.

For details on the JP1/AJS3 character code settings, see 13.4.1 Setting the language environment in the JP1/Automatic Job Management System 3 Configuration Guide.

For details on the characters that can be used in the data of files to be transferred, see 2.4.2(7)(a) Available characters in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.

(4) Attributes page

The following figure shows the Attributes page in the Define Details - [UNIX Job] dialog box.

Figure 12‒103: Attributes page in the Define Details - [UNIX Job] dialog box

[Figure]

The following explains the displayed items.

Hold

Indicates whether to put a unit in hold status in advance. You can specify No or Yes. The default is No.

Type

Set the unit type to Normal or Recovery. The default is Normal.

Exec. service

Select the service of the execution destination. You can specify two types: Standard and Queueless Agent. The default is Standard.

Set timeout period

Indicates whether to set a timeout period of job execution. You can specify No or Yes. The default is No.

Timeout period

If you select Yes in Set timeout period, specify a time-out period in minutes. You can specify 1 to 1,440. The default is a blank.

Delayed end

Specify whether to monitor delayed end of jobs based on time required for execution. Select the Time-required-for-execution check box to monitor delayed end of jobs. The check box is not selected by default.

When you select the Time-required-for-execution check box, specify the time required for execution for a job from 1 to 1,440 (in minutes).

This section appears for the JP1/AJS3 - View, or JP1/AJS2 - View of version 08-50 or later. For details about cautionary notes on monitoring of delayed end of jobs based on time required for execution, see 5.1.3 End delay monitoring based on time-required-for-execution in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

Owner

Specify the owner of the unit. Use a character string of up to 31 bytes. The default is the login JP1 user name. Note that if the upper-level unit-attribute inheritance function has been set for the upper-level jobnet, the default is the owner of the upper-level unit.

JP1 resource group

Specify a JP1 resource group name. Use a character string of up to 63 bytes. You can specify alphanumeric characters and underscores (_). The default is the JP1 resource group name of the upper-level unit. If you specify a blank, you are not authorized to access this group.

Executed by

Select the user who executes the job. The default is User who registered. You can select the following items.

  • User who registered

    Performs user mapping for the JP1 user who registered the job. The system executes the job under the converted OS user account.

  • User who owns

    Performs user mapping for the JP1 user who owns the job. The system executes the job under the converted user account.

You must perform user mapping on the host where you want to execute the job so that the specified user is converted to a OS user.

If the execution-user fixing function is configured for the upper-level unit, the execution user conforms to the unit-attribute profile regardless of the contents of this field.