6.2.26 Setting for ensuring that data generated by jobs is output to result files
In JP1/AJS3, the executable file specified in the detailed definition of a job and the programs started as an extension of that executable file (user job) output data to the standard output or standard error output. The output data is written to a result file (standard output file or standard error output file). The result file is transferred from the agent host to the manager host when the job# terminates.
- #:
-
The job here means a PC job, action job, custom job, QUEUE job executed in JP1/AJS3, submit job, or passing information setting job, and does not mean an event job or queueless job.
In Windows, however, data output by jobs might not be written to a result file if disk access or restart of processing takes time. For example, restart of processing takes time if the memory used by JP1/AJS3 is swapped output when data is written to a result file.
If data output by jobs is not written to a result file, the following phenomena might occur:
-
No value is set for an output macro variable of the passing information setting job, causing the job to terminate abnormally.
-
Information in the Execution Result Details dialog box of JP1/AJS3 - View cannot be viewed.
-
Data in the standard output file and standard error output file cannot be obtained by using the jpqjobget command.
To prevent the above phenomena from occurring, set the PreventResultFileLack environment setting parameter to ensure that data output by jobs is output to result files.
Before you use a passing information setting job, make sure that this setting is enabled. For details about passing information setting jobs, see the following: 2.4.9 Passing information that changes dynamically to a succeeding unit (example of defining a jobnet that uses a passing information setting job) in the Job Management Partner 1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
Note that this setting must be enabled on the host on which the job is executed.
- Organization of this subsection
(1) Definition procedure
-
In Windows Control Panel, open the Services administrative tool, and stop the following service:
-
JP1/AJS3 service
- Cautionary note:
-
In a cluster system, check the cluster settings, and also stop the JP1/AJS3 service on each logical host.
-
-
Execute the following command to set the environment setting parameter described in (2) below:
jajs_config -k definition-key "parameter-name"=value
-
Restart JP1/AJS3.
The new settings are applied to the configuration definition.
(2) Environment setting parameter
Definition key |
Environment setting parameter |
Explanation |
---|---|---|
[{JP1_DEFAULT|logical-host}\JP1NBQAGENT\Job]# |
"PreventResultFileLack"= |
Setting for ensuring that data generated by jobs is output to result files |
- #:
-
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 2.3.2(91) PreventResultFileLack in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2.
(3) Notes
The following notes apply when the PreventResultFileLack environment setting parameter is set to 1:
-
The data output to the standard output and standard error output is written to result files by user jobs rather than JP1/AJS3. Therefore, JP1/AJS3 cannot detect any errors occurring while data is being written to a result file. If an error occurs while data is being written to a result file, check for the cause of the error in the user jobs.
-
If programs started as an extension of an executable file do not end before the executable file ends, a temporary file named A_JPQ*_job-number might remain in a work directory for the job execution environment on the agent host. If this temporary file remains in the work directory even after JP1/AJS3 has terminated, you can delete the temporary file. Deleting it causes no problems.
If a remaining temporary file adversely affects operation, specify NUL for the standard output file name and standard error output file name. Alternatively, specify CON for the standard input file name, standard output file name, and standard error output file name. Note that, if you do so, if you want to check the detailed execution results of a job in JP1/AJS3 - View, data is no longer output to the job's standard error output. Similarly, you can no longer obtain the data in the standard output file and standard error output file by using the jpqjobget command.
-
The job result file is transferred to the manager host when the executable file specified in the detailed job definition ends. If programs started as an extension of an executable file output data to the standard output or standard error output after the executable file ends, that data is written to a result file. However, the result file is not transferred to the manager host.