3.3.4 Suppressing output of information and warning messages to job execution logs
If you intend to use job execution results with other programs, you might want to suppress the following types of output:
-
Output of files under the spool job directory to the standard output and the standard error output
-
Output of information and warning messages (excluding some exception messages) to the standard output and the standard error output
-
Output to the standard error output of job execution logs at the time of job termination
To suppress these outputs, use one the following methods to specify the simple output mode or the minimum output mode:
-
Specifying the OUTPUT_MODE_ROOT parameter (for a root job) or the OUTPUT_MODE_CHILD parameter (for a child job) when you specify environment settings
For details about the OUTPUT_MODE_ROOT parameter, see OUTPUT_MODE_ROOT parameter (specifies the method for outputting the execution results of a root job). For details about the OUTPUT_MODE_CHILD parameter, see OUTPUT_MODE_CHILD parameter (defines the method for outputting the execution results of a child job).
-
Specifying the -m option in the adshexec command during job execution
For details about the adshexec command, see adshexec command (executes a batch job).
-
Specifying the -m option in the adshscripttool command
For details about the adshscripttool command, see adshscripttool command (supports creation of job definition scripts) (Windows only).
If both are specified, the adshexec command specification takes effect. If neither is specified, the expansion output mode is assumed.
- Organization of this subsection
(1) Differences in output contents among the expansion output mode, the simple output mode, and the minimum output mode
The following table describes the differences in the output contents among the expansion output mode, the simple output mode, and the minimum output mode.
Output timing |
Expansion output mode |
Simple output mode |
Minimum output mode |
---|---|---|---|
Job execution |
The contents of the standard output and the standard error output depend on the type of job:
|
The contents of the standard output and the standard error output are output to their output destinations at the time the process started. Of the JP1/Advanced Shell messages that are to be output to the standard output and the standard error output, only error messages are output.#1 |
Same as at the left |
Job termination |
Job execution logs are output to the standard error output (for child jobs, the output is to the root-job's standard error output#2). |
Job execution logs are not output to the standard error output. However, error messages to be output only to JOBLOG are also output to the standard error output during job execution in order to report errors. A child job's JOBLOG is created under the root job's spool job directory and is retained even after the job has terminated.#2 This handling is in effect regardless of the specification of the JOBEXECLOG_PRINT parameter. |
Same as at the left |
Debug execution |
JOBLOG is output to the standard error output at suitable times. JP1/Advanced Shell messages that are to be output to the standard output and the standard error output are output to the standard output and the standard error output in effect at the time debug execution started. |
JOBLOG is not output to the standard error output. JP1/Advanced Shell messages that are to be output to the standard output and the standard error output are output to the standard output and the standard error output in effect at the time debug execution started. When debugging is terminated, only error messages are output. However, a child job that is not subject to debugging is run in the same manner as in normal execution. |
JOBLOG is not output to the standard error output. JP1/Advanced Shell messages that are to be output to the standard output and the standard error output are output to the standard output and the standard error output in effect at the time debug execution started. When debugging terminates, only messages that are not subject to output suppression are output. However, a child job that is not subject to debugging is run in the same manner as in normal execution. |
If you start a job definition script from another job definition script in the simple output mode or the minimum output mode, use child jobs. If a root job is started in the simple output mode or the minimum output mode, error messages are displayed in the standard error output.
(2) How to locate the spool job directory of a job that was executed in the simple output mode or the minimum output mode
When the simple output mode or the minimum output mode is selected, messages that display job IDs and spool job directory names are no longer output. The following describes how to locate the spool job directory of a job that was executed in the simple output mode or the minimum output mode:
-
Specify unique job names with the #-adsh_job command (declares a name for a job).
-
When the job starts, output the values of the following environment variables to the standard error output or to a specific file so that they can be referenced later:
-
ADSH_JOBID environment variable (stores a job ID)
-
ADSH_JOB_NAME (stores a job name)
-
-
Locate the spool job directory based on the job execution date and time.