SPOOLJOB_CHILDJOB parameter (defines how a spool job of a child job is to be handled)
- Organization of this page
Format
#-adsh_conf SPOOLJOB_CHILDJOB {DELETE|MERGE}
Description
This parameter specifies whether the spool job of a child job is to be deleted or is to be merged into the spool job of the root job when the child job terminates.
Operands
- DELETE
-
Specifies that the spool job of a child job is to be deleted when the child job terminates.
Of the child job's job execution logs, only the contents of JOBLOG are output to the standard error output.
For an example of the job execution log output when DELETE is specified, see 3.4.2 Examples of job execution log output.
- MERGE
-
Specifies that the spool job of a child job is to be merged into the spool job of the root job when the child job terminates. As a result, the following processing occurs:
-
The job execution logs of child jobs are merged into the job execution logs of the root job and are output in the order in which the child jobs terminated.
-
JOBLOG and SCRIPT of the root job are created with contents into which JOBLOGs and SCRIPTs of the child jobs have been merged.
-
Job execution logs are output to the following location in a format that clearly shows whether the output contents are for the root job or child jobs:
During normal execution: Standard error output (STDERR, step-number_step_name_STDERR)
During debugging: Standard output and standard error output on the terminal screen
-
The program output data files assigned by the #-adsh_spoolfile command during child job execution are created under the spool job directory of the root job with the following names:
#-adsh_spoolfile command's execution location
File name to be assigned (in Windows, the extension .sysout is added.)
Outside the job step of a child job
Cnumber-giving-the-order-in-which-a-child-job-starts_0000_job-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name
Inside the job step of a child job
Cnumber-giving-the-order-in-which-a-child-job-starts_step-number_step-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name
If the same job definition script is executed multiple times as child jobs, SCRIPT is output the number of times the script is executed.
For details about how to create a spool job directory, see 3.3.2 Outputting job execution results to spool. For details about the format for outputting job execution logs, see 3.4.1(3) Merging a child job's spool job into the root job's spool job.
When MERGE is specified, the maximum number of child jobs that can be started from a single root job, including child jobs started from child jobs, is 9,999,999. Child jobs that exceed this limit terminate in an error. However, if the OS-specified process count or file count limit is reached first, the OS's error processing takes precedence.
For an example of the job execution log output when MERGE is specified, see 3.4.3 Example of job execution log output (when a child job's spool job is merged into the root job's spool job).
-
Notes
-
If this parameter is defined in both the system environment file and the job environment file, the definition in the job environment file takes effect.
-
When MERGE is specified and child jobs are executed asynchronously, the JOBLOG merging order might not match the SCRIPT merging order.
For example, if child job A and child job B are executed asynchronously in a root job, JOBLOG might be merged for child job B first and then for child job A, while SCRIPT might be merged for child job A first and then for child job B.
-
When MERGE is specified and commands in a job definition script are executed asynchronously, the standard output and standard error output of the asynchronously executed commands might be mixed among the ranges of job execution logs for the standard output and the standard error output of child jobs.
-
When MERGE is specified and an initialization error occurs in the started child job before the job definition script has been parsed, merging will not be executed.
-
Child jobs run under the assumption that a SPOOLJOB_CHILDJOB parameter value has been specified in the environment file loaded when the root job was started. Even if the value of the SPOOLJOB_CHILDJOB parameter differs between the root job's job environment file and the child job's job environment file, the child jobs run by ignoring the difference.
-
If a job is executed in the syntax check mode, merging will not be executed.
Example
-
In this example, the spool job of a child job is merged into the spool job of the root job when the child job terminates:
#-adsh_conf SPOOLJOB_CHILDJOB MERGE #-adsh_conf CHILDJOB_SHEBANG /bin/sh