3.3.2 Outputting job execution results to spool
In the spool root directory specified in the environment file, create a directory for each job and output job execution results to that directory. Job execution logs and the files output by programs in job steps are output to the directory for each job.
The following shows the structure of the spool directory:
spool-root-directory |-lock-file +-spool-job-directory +-.adshallocfile or adshallocfile#1 +-.joborder or adsh.joborder#1 +-.sysout or sysout.ini#1 +-EVENTFILE_ROOT_INF_000000_000000_000001 +-EVENTFILE_execution-start-date-and-time_job-ID : +-EVENTFILE_execution-start-date-and-time_job-ID +-JOBLOG#2 +-JOBLOG_job-ID_sequence-number +-JOBLOG_number-giving-the-order-in-which-a-child-job-starts#1 +-SCRIPT#2 +-SCRIPT_number-giving-the-order-in-which-a-child-job-starts#1 +-STDERR#2 +-STDOUT#2 +-step-number_step-name_STDOUT#2 +-step-number_step-name_STDERR#2 +-0000_job-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name#3 +-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#3 +-step-number_step-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name#3 : +-step-number_step-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name |-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#3
- #1
-
This is a temporary file created during job execution. The following explains the contents of such temporary files:
File name
Description
.adshallocfile or adshallocfile
.joborder or adsh.joborder
File that manages the start order of child jobs
.sysout or sysout.ini
Spool job management file
JOBLOG_number-giving-the-order-in-which-a-child-job-starts
Job execution log for a child job for merging that is output when MERGE (merging the child job's spool job into the root job's spool job) is specified in the SPOOLJOB_CHILDJOB parameter in the environment file
SCRIPT_number-giving-the-order-in-which-a-child-job-starts
If a job is terminated immediately by SIGKILL in UNIX or TerminateProcess in Windows, these files might remain in the spool job directory. When you delete spool directories, also delete these files.
- #2
-
The contents of this file are also output to the job execution log. For details about what is output to the job execution log, see 3.4 Job execution log.
- #3
-
This is a program output data file that is allocated by the #-adsh_spoolfile command. For details about program output data files, see 5.9.3 Allocating program output data files and performing postprocessing.
- Important note
-
-
In Windows, all output files except EVENTFILE are appended with the extension .sysout.
-
Do not place under the spool directory any user-specific file that is not a file or directory created by JP1/Advanced Shell.
-
The following subsections explain the files and directories that are not temporary files.
- Organization of this subsection
-
(1) spool-root-directory
The directory name is specified in the SPOOL_DIR parameter in the environment file.
(2) lock-file
This file is used to lock each spool directory so that the same event file is not used by multiple commands at the same time. This file is created when the adshevtout and adshhk commands are executed.
The name of the lock file is as shown below. Do not delete a created lock file.
-
In UNIX: .spool.lck
-
In Windows: spool.lck
(3) spool-job-directory
This directory has the job sequence number as its name and is created for each job. When the job terminates, the directory is renamed to job-ID-job-name.
You can use the adshhk command to delete accumulated spool jobs. For details about the adshhk command, see 3.8 Deleting spool jobs.
(4) EVENTFILE_ROOT_INF_000000_000000_000001
This is a root job search event file. It contains the information used to determine whether the condition specified in the adshevtout command (output job definition script operation information) is satisfied. This file is created for each root job. This file is not created in the following cases:
-
JP1/Advanced Shell - Developer is used
-
The job is executed in the debugger mode.
-
The adshexec command terminated before the KNAX0091-I message was issued.
(5) EVENTFILE_execution-start-date-and-time_job-ID
This is an event file. While the event file is being created, _making is appended to the file name. This file is created for each root job and each child job.
- Example of event file name:
-
EVENTFILE_20120422_193502_123456
This file is not created in the following cases:
-
JP1/Advanced Shell - Developer is used
-
The job is executed in the debugger mode.
-
The adshexec command terminated before the KNAX0091-I message was issued.
- execution-start-date-and-time
-
The root or child job's execution start date and time (UTC) are output in the following format:
YYYYMMDD_hhmmss_dddddd
YYYY: Four-digit decimal number indicating the calendar year (1970 through 2038)
MM: Two-digit decimal number indicating the month (01 through 12)
DD: Two-digit decimal number indicating the date (01 through 31)
hh: Two-digit decimal number indicating the hour (00 through 23)
mm: Two-digit decimal number indicating the minute (00 through 59)
ss: Two-digit decimal number indicating the second (00 through 59)
dddddd: Six-digit decimal number indicating the microsecond (000000 through 999999)
- job-ID
-
A six-digit decimal number is assigned to each root job or child job.
(6) JOBLOG
This is for job execution messages. Messages indicating the job's execution status, including command execution results and file allocation results, are output to this directory.
(7) JOBLOG_job-ID_sequence-number
This is the job execution log for a child job.
This file is created when the child job starts, but only if one of the following methods was used to specify that the child job is to be run in the simple output mode or the minimum output mode:
-
Specifying SIMPLE or MINIMUM in the -m option of the adshexec command
-
Specifying SIMPLE or MINIMUM in the -m option of the adshscripttool command
-
Specifying SIMPLE or MINIMUM in the OUTPUT_MODE_CHILD parameter
This file is not created when MERGE (merging the child job's spool job into the root job's spool job) is specified in the SPOOLJOB_CHILDJOB parameter.
(8) SCRIPT
This is for script image files. The contents of the first job definition script started and the contents of external job definition script files specified in the #-adsh_script command are output to this directory. External job definition script files specified using other methods, such as the . (dot) command, are not output to this directory. When you want to output the contents of job definition scripts as logs, you must use the #-adsh_script command.
If MERGE is specified in the SPOOLJOB_CHILDJOB parameter when the root job is run in the expansion output mode and the child job is run in the minimum output mode, the child job's SCRIPT is not merged into the root job's SCRIPT. For details, see 3.4.1(3)(c) When the output mode of the root job differs from that of the child job.
(9) STDERR
This is the standard error output for the job. This file is not created when either of the following methods was used when the root job started to specify that the root job is to be run in the simple output mode or the minimum output mode:
-
Specifying SIMPLE or MINIMUM in the -m option of the adshexec command
-
Specifying SIMPLE or MINIMUM in the OUTPUT_MODE_ROOT parameter
The following header is output at the beginning of the file:
******** JOB SCOPE STDERR ********
(10) STDOUT
This is the standard output for the job. It is created when the -s option is specified in the adshexec command or SPOOL is specified in the OUTPUT_STDOUT parameter in the environment file. This file is not created when either of the following methods was used when the root job started to specify that the root job is to be run in the simple output mode or the minimum output mode:
-
Specifying SIMPLE or MINIMUM in the -m option of the adshexec command
-
Specifying SIMPLE or MINIMUM in the OUTPUT_MODE_ROOT parameter
The following header is output at the beginning of the file:
******** JOB SCOPE STDOUT ********
(11) step-number_step-name_STDOUT
If job steps are defined, this is the standard output within the corresponding job step. If the job step name consists of more than eight bytes, only the first eight bytes of the job step name are used for step-name.
This standard output is created when the -s option is specified in the adshexec command or SPOOL is specified in the OUTPUT_STDOUT parameter in the environment file. This file is not created when either of the following methods was used when the root job started to specify that the root job is to be run in the simple output mode or the minimum output mode:
-
Specifying SIMPLE or MINIMUM in the -m option of the adshexec command
-
Specifying SIMPLE or MINIMUM in the OUTPUT_MODE_ROOT parameter
(12) step-number_step-name_STDERR
If job steps are defined, this is the standard error output within the corresponding job step. If the job step name consists of more than eight bytes, only the first eight bytes of the job step name are used for step-name.
This file is not created when either of the following methods was used when the root job started to specify that the root job is to be run in the simple output mode or the minimum output mode:
-
Specifying SIMPLE in the -m option of the adshexec command
-
Specifying SIMPLE in the OUTPUT_MODE_ROOT parameter
(13) 0000_job-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name
This is a program output data file allocated by the #-adsh_spoolfile command outside the job step.
(14) 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
This is a program output data file allocated by the #-adsh_spoolfile command outside the child job's job step.
This file is created only when MERGE (merging a child job's spool job into the root job's spool job) is specified in the SPOOLJOB_CHILDJOB parameter in the environment file.
(15) step-number_step-name_sequence-number-of-file-environment-variable-definition-name_file-environment-variable-definition-name
This is a program output data file allocated by the #-adsh_spoolfile command inside the job step.
(16) 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
This is a program output data file allocated by the #-adsh_spoolfile command inside the child job's job step.
This file is created only when MERGE (merging a child job's spool job to the root job's spool job) is specified in the SPOOLJOB_CHILDJOB parameter in the environment file.