Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Change Debug (CHGDBG) command changes the attributes of the debugging session currently in effect for a job. All of the attributes can be changed, except which programs to debug. Use the Add Program (ADDPGM) command or the Remove Program (RMVPGM) commands to add or remove a program from debug mode.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DFTPGM | Default program | Name, *SAME, *NONE | Optional, Positional 1 |
MAXTRC | Maximum trace statements | Integer, *SAME | Optional |
TRCFULL | Trace full | *SAME, *STOPTRC, *WRAP | Optional |
UPDPROD | Update production files | *SAME, *NO, *YES | Optional |
OPMSRC | OPM source level debug | *SAME, *NO, *YES | Optional |
Top |
Specifies 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.
Top |
Specifies 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.
Note: Instruction stepping can be performed on a program being debugged in an interactive environment by setting the maximum number of trace statements to 1 and the value for the Trace full (TRCFULL) parameter to *STOPTRC.
This parameter is applicable only in the OPM environment.
Top |
Specifies 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.
Top |
Specifies whether or not 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.
Top |
Specifies 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. Additionally, this parameter is valid for OPM CL, OPM RPG and OPM COBOL programs that were created with OPTION(*LSTDBG) with the CRTCLPGM, CRTRPGPGM, CRTCBLPGM CRTSQLRPG, CRTSQLCBL, and CRTRPTPGM commands. If the OPM program is not CL, RPG or COBOL and was not compiled with a valid debug option, then this parameter is ignored.
OPM programs already added to debug prior to the CHGDBG command will continue to be active under the debug environment (ILE or OPM) they are currently active under. Programs added to debug after the CHGDBG command is issued are affected by the OPMSRC parameter.
This parameter is applicable in both OPM and ILE environment.
Top |
CHGDBG MAXTRC(400) TRCFULL(*STOPTRC)
This command 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.
Top |
Top |