
Writing to a log dataset without using the system logger service
This subsection describes how to write data to a log dataset without using the system logger service.
How the data is written depends on the number of allocated log datasets.
When both YKLOG01 and YKLOG02 are specified
1. Logs are written to YKLOG01. If the log dataset is reused, logs are added to the end of the previous
log output.
2. If YKLOG01 is full, logs are written to YKLOG02.
3. If YKLOG02 is also full, logs are written to YKLOG01. In this case, the existing logs in YKLOG01
are overwritten.
4. Steps 2 and 3 are repeated.
If a log dataset is full and the log output destination is switched, the KTG291I message (the log dataset
is full) and the KTG292I message (the log dataset is switched) are output to the console. At this time,
the KTG291I message indicates the name of the log dataset that became full. The KTG292I message
indicates the job name and the DD names of log datasets before and after switching (YKLOG01 or
YKLOG02).
TIP:
When a log dataset becomes full (KTG291I and KTG292I messages are output), you can suspend
execution of the script and back up the log dataset indicated in the KTG291I message. However,
the log dataset cannot be backed up if the KTG292I message indicates the same log dataset before
and after switching. This is because an error might have occurred in either log dataset and the log
dataset before switching has been overwritten.
If neither YKLOG01 nor YKLOG02 is specified
The KTG261E message is output and processing continues without acquiring logs. To acquire logs,
you need to log on to TSO/E again and then specify the YKLOG01 and YKLOG02 DD statements.
If either YKLOG01 or YKLOG02 is specified
The KTG261E message is output and logs are output only to the log dataset for which the DD statement
is specified. In this case, if the log dataset becomes full, it will be overwritten from the beginning.
If an I/O error occurs in YKLOG01 or YKLOG02
The messages from KTG262E to KTG264E are output, and logs will be output only to the log dataset
in which an I/O error has not occurred. If the log dataset becomes full, it will be overwritten from the
beginning. If an I/O error occurs in both log datasets, processing continues without acquiring logs.
TIP:
You cannot view log datasets during execution of a CLI command. Wait until the executing script
terminates and then view the log dataset.
User Guide 217
Commenti su questo manuale