SET LOG command
Controls whether z/OS® Debugger writes each performed command and the resulting output to the log file and defines (or redefines) the name of the log file.
ON- Specifies that commands and output are written to the log file.
FILE fileid- Identifies the log file used. The
FILEkeyword cannot be abbreviated.In non-CICS®, fileid is a DD name or a fully-qualified data set name. Partitioned data sets cannot be used.
In CICS, fileid is a fully-qualified data set name. The CICS region must have update authorization to the log file.
If fileid has the form of a DD name, z/OS Debugger checks to see if the file is allocated.
In full-screen mode, the log file should not be allocated to the 3270 terminal device.
OLD- Specifies that the new information is to replace any existing information in the specified file. This operand is ignored if fileid specifies a DD name.
MOD- Specifies that the new information is appended after any existing information in the specified file. This operand is ignored if fileid specifies a DD name.
KEEP count- Specifies the number of lines of log output retained for display.
The initial setting is 1000;
countcannot equal zero (0). OFF- Specifies that commands and output are not written to a log file.
Usage notes
- The following list describes how z/OS Debugger determines
the initial setting for
SET LOG:- If a default user log file was not specified through the
EQAOPTS
LOGDSNcommand, the following rules apply:- In a non-CICS environment, if you do not allocate INSPLOG
DD, the initial setting is
OFF. - In a non-CICS environment, if you do allocate INSPLOG DD, the initial setting is
ON FILE INSPLOG. - In a CICS environment,
the initial setting is
OFF.
- In a non-CICS environment, if you do not allocate INSPLOG
DD, the initial setting is
- If a default user log file was specified through the EQAOPTS
LOGDSNcommand, the following rules apply:- In batch mode, if you do not allocate INSPLOG DD, the initial
setting is
OFF. - In batch mode, if you do allocate INSPLOG DD, the initial setting
is
ON FILE INSPLOG. - In full screen mode and a non-CICS environment, if you do not allocate
INSPLOG DD, the initial setting is
ON FILE fileid. Specify fileid through the EQAOPTSLOGDSNcommand. - In full screen mode and a non-CICS environment, if you do allocate INSPLOG DD, the initial setting is
ON FILE INSPLOG. - In a CICS environment,
the initial setting is
ON FILE fileid. Specify fileid through the EQAOPTSLOGDSNcommand.
- In batch mode, if you do not allocate INSPLOG DD, the initial
setting is
- If a default user log file was not specified through the
EQAOPTS
- If the EQAOPTS
LOGDSNcommand was specified, then the EQAOPTSLOGDSNALLOCcommand can be specified to indicate that, if the log file data set does not exist, z/OS Debugger creates it. This can be used to create the file for new z/OS Debugger users.For existing z/OS Debugger users, if you use a SAVESETS data set, then the file contains a
SET LOGcommand. If a specification for the EQAOPTSLOGDSNcommand is created after you have saved settings into your SAVESETS file, z/OS Debugger does not change your savedSET LOGcommand and does not create a new log file data set.To learn how to specify the EQAOPTS commands
LOGDSNandLOGDSNALLOC, see EQAOPTS commands.FILE LOGDSNis used for theSET LOG ONcommand when both of the following conditions are true:A SET LOG ONwithout aFILEfileid is issued whenLOGisOFF.ON FILE LOGDSNwas used as the initial setting ofSET LOGvia theEQAOPTS LOGDSNcommand.
For CICS, if you are not logged in or are logged in under the default user ID, z/OS Debugger does not create or use the file specified for fileid.
For Db2® stored procedures, do not set up z/OS Debugger to create or use the file specified for fileid. Since multiple users share the same default data set, multiple users can attempt to write to the data set at the same time. In this environment, if
LOGDSNis specified, specifyNULLFILEfor file-name-pattern. - The log output lines retained for display are always the last (that is, the most recent) lines.
- Setting
LOG OFFdoes not suppress the log display. - If you are debugging in full-screen mode and the log file is allocated
to the terminal, issue a
SET LOG OFFcommand before issuing aQUITcommand. If you do not issue theSET LOG OFFcommand, theQUITcommand fails. - Ensure that you allocate a log file big enough to hold all the log output from a debug session, because the log file is truncated after it becomes full. (A warning message is not issued before the log is truncated.)
- For remote debug mode,
you can only use the
SET LOG ONandSET LOG OFFcommands. TheSET LOG ONcommand displays messages that explain why it stopped at the current location. TheSET LOG ONcommand does not save the contents of the log to a permanent location. When the setting forSET LOGisOFF, messages related to breakpoints are not displayed. For example, the messageProgram was stopped due to line/statement breakpoint at statement 232.
is not displayed.If you enter
SET AUTOMONITOR ON LOGcommand, theSET LOG ONandSET LOG OFFcommands are ignored. All messages are displayed.
Examples
- Specify that commands and output are written to the log file named
mainprog.
Another example using the data set nameSET LOG ON FILE mainprog;thing.SET LOG ON FILE userid.thing.log - Indicate that 500 lines of log output are retained for display.
SET LOG KEEP 500;
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- IBM® z/OS Debugger User's Guide
- Related references
- z/OS Debugger commands supported in remote debug mode
