Command reference / prog

CHGDBG

Change Debug

Updates the attributes of the current debug session. Use ADDPGM or RMVPGM to change the set of programs being debugged.

Allowed environments: *ALL. Positional parameters: 1.

Parameters

DFTPGM Default program

Sets the original program model (OPM) program to use as the default program during debug mode. The program specified here is used as the default program for any of the other debug commands for which *DFTPGM was supplied for the Program (PGM) parameter. (That is, if a default program was previously specified, this parameter can change it.) This parameter is applicable only in the OPM environment.

Type
*NAME
Required
No
Default
*SAME
Length
10
Case
Uppercase

Suggested / special values: *SAME, *NONE

*SAME
The same program currently specified as the default program, if any, is used.
*NONE
No program is specified as the default program; if a program was specified as a default program, it is no longer the default program.
name
Enter the name of the program to use as the default program during debug mode. The same name must have been specified for the PGM parameter of the Start Debug (STRDBG) or Add Program (ADDPGM) command.

MAXTRC Maximum trace statements

Sets the maximum number of trace statements that the system puts into the job's trace file before either stopping tracing or wrapping around (overlaying) on the trace file. When the trace file contains the maximum specified, the system performs the actions indicated by the value supplied for the Trace full (TRCFULL) parameter.

Type
*INT4
Required
No
Default
*SAME
Case
Uppercase

Suggested / special values: *SAME

*SAME
Keep the current maximum for the number of trace statements in the file.
integer
Enter the maximum number of trace statements that can be in the trace file.

TRCFULL Trace full

Sets what happens when the job's trace file is full, that is when it contains the maximum number of trace statements specified by the Maximum trace statements (MAXTRC) parameter. This parameter is applicable only in the OPM environment.

Type
*CHAR
Required
No
Default
*SAME
Length
8
Case
Uppercase

Allowed values: *SAME, *STOPTRC, *WRAP

*SAME
Keep the current action taken when the trace file is full.
*STOPTRC
In a batch environment, tracing stops but the program continues processing. In an interactive environment, control is given to the user when a breakpoint occurs.
*WRAP
The trace file is overlaid with new trace statements as they occur, wrapping from the beginning of the file. The program continues processing until completed with no message to indicate that wrapping has occurred.

UPDPROD Update production files

Controls whether database files in a production library can be opened for changes (that is, for adding, deleting, or changing records in the file) while the job is in debug mode. If not, the files must be copied into a test library before trying to run a program that uses the files. This parameter is applicable in both the OPM and ILE environments.

Type
*CHAR
Required
No
Default
*SAME
Length
8
Case
Uppercase

Allowed values: *SAME, *NO, *YES

*SAME
Keep the current previously specified value for this parameter.
*NO
Database files in production libraries cannot be changed during debug mode. Database files can be opened for reading only.
*YES
Database files in production libraries can be changed while the job is in debug mode.

OPMSRC OPM source level debug

Controls whether OPM programs are debugged using the system source debug support (same as ILE source debug). This parameter is valid for OPM CL, OPM RPG and OPM COBOL programs that were created with OPTION(*SRCDBG) with CRTCLPGM, CRTRPGPGM and CRTCBLPGM commands.

Type
*CHAR
Required
No
Default
*SAME
Length
8
Case
Uppercase

Allowed values: *SAME, *NO, *YES

*SAME
Keep the current setting.
*NO
OPM debug functions are used for OPM programs.
*YES
ILE debug functions are used for OPM programs.

Examples

CHGDBG MAXTRC(400) TRCFULL(*STOPTRC)

Changes the maximum number of trace statements that can be put in the trace file to 400. The tracing is stopped when the file is full.

IBM command documentation

Generated from os/cl/catalog/CHGDBG.json and os/cl/help/CHGDBG.json.