7.3.40 SPOOLJOB_CHILDJOB parameter (defines how a spool job of a child job is to be handled)
Syntax
#-adsh_conf SPOOLJOB_CHILDJOB {MERGE|DELETE}
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
- MERGE
-
This command 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 finishes. 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 the syntax that clearly shows whether the output contents are for the root job or child job:
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 while executing a child job are created in 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.)
If outside the job step of a child job:
C number giving the order in which a child job starts_0000_job-name_file-environment-variable-definition-name-sequence_file-environment-variable-definition-name
If within the job step of a child job:
C number-giving-the-order-in-which-a-child-job-starts_step-number_step-name_file-environment-variable-definition-name-sequence_file-environment-variable-definition-name
If the same job definition script is executed for multiple times as a child job, SCRIPT is output for the number of times the script is executed.
For details about how to create a spool job directory, see 3.4.2 Outputting job execution results to spool. For details about the format for outputting job execution logs, see (3) Merging a child job's spool job into the root job's spool job.
If you specify MERGE, 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. A child job that exceeds this limit finishes 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 if you specify MERGE, see 3.5.3 Examples of job execution log output(if you delete the spool job of a child job).
-
- DELETE
-
This command deletes the spool job of a child job when the child job terminates.
This command only outputs contents of JOBLOG in the job execution log of a child job to the standard error output.
For an example of the job execution log output if DELETE is specified, see 3.5.3 Examples of job execution log output(if you delete the spool job of a child 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