Command reference / prog
STRDBG
Start Debug
Puts the job into debug mode and optionally adds up to 20 programs, 20 service programs, and 20 class files to debug. It also sets session attributes, such as whether database files in production libraries can be updated. Debug can operate in OPM, ILE, and Java environments at the same time, and each parameter description states which environment it applies to. Users registered for graphical debugging get the graphical system debugger.
Allowed environments: *ALL.
Positional parameters: 1.
Restrictions
- Cannot be used while already in debug mode; use ENDDBG to end debug mode.
- Cannot be used while servicing another job that is held, suspended, or ending.
- Shipped with public *EXCLUDE authority; the QPGMR, QSRV, and QSRVBAS profiles have private authority to use it.
- Requires *CHANGE authority to the program, or *USE authority to the program plus *SERVICE special authority.
Parameters
PGM
Program
Specifies up to 20 programs to debug. A program must be named here, in ADDPGM, or in DSPMODSRC before it can be debugged. Applies to both OPM and ILE.
Suggested / special values:
*NONE
*NONE- No programs are specified at start; ADDPGM or DSPMODSRC can add them later.
*LIBL- All libraries in the thread's library list are searched until the first match is found.
*CURLIB- The job's current library is used; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Program
Program
Library
Library
Suggested / special values:
*LIBL, *CURLIB
DFTPGM
Default program
Specifies the OPM program used as the default for other debug commands that give *DFTPGM for PGM. Applies only to OPM, and a bound program cannot be specified.
Suggested / special values:
*PGM, *NONE
*PGM- The first OPM program named on PGM that is added to the OPM debug environment becomes the default.
*NONE- No program is the default, and any previous default is cleared.
MAXTRC
Maximum trace statements
Specifies the maximum number of trace statements kept in the job's trace file before tracing stops or wraps around. Applies only to OPM.
TRCFULL
Trace full
Specifies what happens when the trace file reaches the MAXTRC limit. Applies only to OPM.
Allowed values:
*STOPTRC, *WRAP
*STOPTRC- In batch, tracing stops and the program continues; interactively, control returns to the user at each breakpoint.
*WRAP- The trace file is overlaid from the beginning, keeping the most recent statements, with no message issued.
UPDPROD
Update production files
Specifies whether database files in production libraries can be opened for updating or adding records while the job is in debug mode. Applies to OPM and ILE.
Allowed values:
*NO, *YES
*NO- Production files can only be read, which protects them from unwanted updates; some menus or function keys may not work correctly.
*YES- Database files in production libraries can be updated in debug mode.
OPMSRC
OPM source level debug
Specifies that OPM programs are debugged with system source debug support, as ILE is. Valid for OPM CL, RPG, and COBOL programs compiled with a suitable debug option; other OPM programs ignore it.
Allowed values:
*NO, *YES
*NO- OPM debug functions are used for OPM programs.
*YES- ILE debug functions are used for OPM programs.
SRVPGM
Service program
Specifies up to 20 service programs to debug. Each must be named here or with DSPMODSRC before it can be debugged. Applies only to ILE.
Suggested / special values:
*NONE
*NONE- No service programs are specified at start; DSPMODSRC can add them later.
*LIBL- All libraries in the thread's library list are searched until the first match is found.
*CURLIB- The job's current library is used; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Service program
Service program
Library
Library
Suggested / special values:
*LIBL, *CURLIB
CLASS
Class file
Specifies up to 20 class file path names to debug. Each must be named here or with DSPMODSRC before it can be debugged. Applies only to ILE.
Suggested / special values:
*NONE
*NONE- No class files are specified at start; DSPMODSRC can add them later.
DSPMODSRC
Display module source
Specifies whether the first display of the source debug program is shown when the command runs without errors. Applies only to ILE.
Allowed values:
*PGMDEP, *NO, *YES
*PGMDEP- Shown if any named program is ILE, or if any is OPM with source debug data and OPMSRC(*YES); not shown if all are OPM and OPMSRC(*NO).
*NO- The first display of the source debug program is not shown.
*YES- The first display of the source debug program is shown.
SRCDBGPGM
Source debug program
Specifies the source debug program to use. Applies only to ILE.
Suggested / special values:
*SYSDFT
*SYSDFT- The system source debug program is used.
*LIBL- All libraries in the thread's library list are searched until the first match is found.
*CURLIB- The job's current library is searched; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Source debug program
Source debug program
Library
Library
Suggested / special values:
*LIBL, *CURLIB
UNMONPGM
Unmonitored message program
Specifies a user program called when an unmonitored message occurs in the job being debugged. Applies only to OPM.
Suggested / special values:
*NONE
*NONE- No program is called when an unmonitored message occurs.
*LIBL- All libraries in the thread's library list are searched until the first match is found.
*CURLIB- The job's current library is searched; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Unmonitored message program
Unmonitored message program
Library
Library
Suggested / special values:
*LIBL, *CURLIB
DBGENCKEY
Decryption key
Specifies the 16-byte key used to decrypt encrypted debug text views; shorter keys are padded to 16 bytes with x'40'.
Suggested / special values:
*NONE
*NONE- No decryption key is set at start; one can be entered later from the Enter decryption key panel.
Examples
STRDBG PGM(TESTLIB/PAYROLL) UPDPROD(*NO)
Starts debug mode for program PAYROLL in test library TESTLIB. Files PAYROLL updates must be in a test library.
Generated from os/cl/catalog/STRDBG.json and os/cl/help/STRDBG.json.