ILE COBOL Programmer's Guide

Adding Program Objects and Service Programs to a Debug Session

You can add more program objects and service programs to a debug session after starting the session.

To add ILE program objects and service programs to a debug session, use option 1 (Add program) and type the name of the program object on the first line of the Work with Module List display (see Figure 34). The Work with Module List display can be accessed from the Display Module Source display by pressing F14 (Work with Module List). To add a service program, change the default program type from *PGM to *SRVPGM. There is no limit to the number of ILE program objects and service programs that can be included in a debug session at any given time.

To add OPM program objects to a debug session, you have two choices depending on the value specified for OPMSRC. If you specified OPMSRC(*YES), by using either STRDBG, the SET debug command, or CHGDBG, then you add an OPM program using the Work with Module List display. (Note that there will not be a module name listed for an OPM program.) There is no limit to the number of OPM programs that can be included in a debug session at one time when OPMSRC(*YES) is specified. If you specified OPMSRC(*NO), then you must use the Add Program (ADDPGM) command. Only 20 OPM programs can be in a debug session when OPMSRC(*NO) is specified.

Note:
You cannot debug an OPM program with debug data from both an ILE and an OPM debug session. If an OPM program is already in an OPM debug session, you must first remove it from that session before adding it to the ILE debug session or stepping into it from a call statement. Similarly, if you want to debug it from an OPM debug session, you must first remove it from an ILE debug session.

Figure 34. Adding an ILE Program Object to a Debug Session

+--------------------------------------------------------------------------------+
|                                  Work with Module List                         |
|                                                            System:   ISERIES   |
|Type options, press enter.                                                      |
|  1=Add program   4=Remove program   5=Display module source                    |
|  8=Work with module breakpoints                                                |
|Program                                                                         |
|Opt     Program/module     Library        Type                                  |
|1        TEST________      TESTLIB___     *PGM___                               |
|_        MYPGM1            TESTLIB        *PGM                                  |
|_          MYPGM1                         *MODULE     Selected                  |
|_        USERDSP           DSPLIB         *SRVPGM                               |
|_          SAMPMDF                        *MODULE                               |
|_          GETUSER                        *MODULE                               |
|                                                                                |
|                                                                      Bottom    |
|Command                                                                         |
|===> ___________________________________________________________________        |
|F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F12=Cancel                     |
|                                                                                |
+--------------------------------------------------------------------------------+

When you have finished adding program objects or service programs to the debug session, press F3 (Exit) from the Work with Module List display to return to the Display Module Source display.

Note:
You must have *CHANGE authority to a program to add it to a debug session. ILE service programs can be added to a debug session only by using option 1 on the Work with Module List display. ILE service programs cannot be specified on the STRDBG command.


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