ILE COBOL Programmer's Guide


Starting the ILE Source Debugger

Once you have created a debug view, you can begin debugging your application.

To start the ILE source debugger, use the Start Debug (STRDBG) command. Once the debugger is started, it remains active until you enter the End Debug (ENDDBG) command. You can change the attributes of the debug mode later in the job by using the Change Debug (CHGDBG) command.

Table 6 lists the parameters and their default values for the STRDBG command and the CHGDBG command. The ENDDBG command does not have any parameters associated with it. For a full description of the STRDBG, CHGDBG, and ENDDBG commands and their parameters, refer to the CL and APIs section of the Programming category in the iSeries 400 Information Center at this Web site -http://publib.boulder.ibm.com/pubs/html/as400/infocenter.htm.

Table 6. Parameters for STRDBG and CHGDBG Commands and their Default Values

Parameter Group STRDBG Command Parameter(Default Value) CHGDBG Command Parameter(Default Value)
Identification PGM(*NONE) DFTPGM(*PGM) DFTPGM(*SAME)
Trace MAXTRC(200) TRCFULL(*STOPTRC) MAXTRC(*SAME) TRCFULL(*SAME)
Miscellaneous UPDPROD(*NO)
OPMSRC(*NO)
SRVPGM(*NONE)
CLASS(*NONE)
DSPMODSRC(*PGMDEP)
SRCDBGPGM(*SYSDFT)
UNMONPGM(*NONE)
UPDPROD(*SAME) OPMSRC(*SAME)
Note:
Trace applies only to OPM programs and is not applicable to ILE programs and service programs.

You can initially add as many as 20 program objects to a debug session by using the Program (PGM) parameter on the STRDBG command. (Depending on how the OPM programs were compiled and also on the debug environment settings, you may be able to debug them by using the ILE source debugger.) They can be any combination of ILE or OPM programs.

Only program objects can be specified on the PGM parameter of the STRDBG command. Up to 20 service programs can initially be added to the debug session by using the Service Program (SRVPGM) parameter of the STRDBG command. Additional service programs can be added to the debug session after it has been started. In addition, you can initially add as many as 20 service program objects to a debug session by using the Service Programs (SRVPGM) parameter on the STRDBG command. The rules for debugging a service program are the same as those for debugging a program:

The first program specified on the STRDBG command is shown if it has debug data, and, if OPM, the OPMSRC parameter is *YES. If ILE, the entry module is shown, if it has debug data; otherwise, the first module bound to the ILE program with debug data is shown.

To debug an OPM program using the ILE source debugger, the following conditions must be met:

  1. The OPM program was compiled with OPTION(*LSTDBG) or OPTION(*SRCDBG). (Three OPM languages are supported: RPG, COBOL, and CL. RPG and COBOL programs can be compiled with *LSTDBG or *SRCDBG, but CL programs must be compiled with *SRCDBG.)
  2. The ILE debug environment is set to accept OPM programs. You can do this by specifying OPMSRC(*YES) on the STRDBG command. (The system default is OPMSRC(*NO).)

If these two conditions are not met, then you must debug the OPM program with the OPM system debugger.

If an OPM program compiled without *LSTDBG or *SRCDBG is specified, and a service program is specified, the service program is shown if it has debug data. If there is no debug data, then the DSPMODSRC screen will be empty. If an ILE program and a service program are specified, then the ILE program will be shown.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]