ILE COBOL Programmer's Guide

STRDBG Example

For example, to start a debug session for the sample debug program MYPGM1 and a called OPM program MYPGM2, type:

STRDBG PGM(TESTLIB/MYPGM1 MYLIB/MYPGM2) OPMSRC(*YES)
Note:
You must have *CHANGE authority to a program object to add it to a debug session.

After entering the STRDBG command, the Display Module Source display appears. When a mixture of ILE programs and ILE debugger-enabled OPM programs are specified on the STRDBG command, the first program with debug data is shown. If the first program is an ILE program, the first module object bound to the program object with debug data is shown as in Figure 33.

Figure 33. Starting a Debug Session

+--------------------------------------------------------------------------------+
|                        Display Module Source                                   |
|  Program:   MYPGM1         Library:   TESTLIB        Module:   MYPGM1          |
|       1         IDENTIFICATION DIVISION.                                       |
|       2         PROGRAM-ID.  MYPGM1.                                           |
|       3        *                                                               |
|       4        * This is the main program that controls                        |
|       5        * the external file processing.                                 |
|       6        *                                                               |
|       7                                                                        |
|       8         ENVIRONMENT DIVISION.                                          |
|       9         INPUT-OUTPUT SECTION.                                          |
|      10         FILE-CONTROL.                                                  |
|      11              SELECT EF1                                                |
|      12                 ASSIGN TO DISK-EFILE1                                  |
|      13                 FILE STATUS IS EFS1                                    |
|      14                 ORGANIZATION IS SEQUENTIAL.                            |
|      15                                                                        |
|                                                                  More...       |
|  Debug . . .   ________________________________________________________________|
|_______________________________________________________________________________ |
| F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display variable     |
| F12=Resume       F17=Watch variable   F18=Work with watch   F24=More keys      |
+--------------------------------------------------------------------------------+


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