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

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.

Type
*QUAL
Required
No
Default
*NONE
List limit
20
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

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.

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

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.

Type
*INT4
Required
No
Default
200
Case
Uppercase

TRCFULL Trace full

Specifies what happens when the trace file reaches the MAXTRC limit. Applies only to OPM.

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

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.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

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.

Type
*QUAL
Required
No
Default
*NONE
List limit
20
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

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.

Type
*CHAR
Required
No
Default
*NONE
Length
50
List limit
20
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*PGMDEP
Length
7
Case
Uppercase

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.

Type
*QUAL
Required
No
Default
*SYSDFT
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

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.

Type
*QUAL
Required
No
Default
*NONE
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

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'.

Type
*CHAR
Required
No
Default
*NONE
Length
50
Case
Uppercase

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.

IBM command documentation

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