Skip to main content  
        iSeries home   |   Easy400  
 About it

Enhanced Debug
by Giovanni B. Perotti (Italy)

This utility provides an easier and quicker way of using IBM i system command STRDBG (Start Debug).

1. About it  2. Requirements  3. Installation  4. Operation

1. About it

System command STRDBG (Start Debug)
  • Requires that a previous debugging is ended by command ENDDBG (End Debug)
  • If the job to be debugged is not the current interactive one, must be preceded by a STRSRVJOB (Start Service Job) command specifying the full qualified jobname (job_number/user_name/job_name) of the job to be debugged.
    Besides, the ENDDBG command must be followed by an ENDSRVJOB (End Service Job) command.
These requirements make the start of debugging really boring and time consuming.

Our command EDBG/EDBG (Enhanced Debug) takes care of executing all the needed STRSRVJOB, STRDBG, ENDDBG and ENDSRVJOB commands. Besides, it is able to provide command STRDBG with the full qualified name of the job to be served by simply entering its job number.

In this way, a developer can stay better focused on his debug job without caring for set up and tear down operations.

2. Requirements

  • Any IBM i OS release, from V5R3 on.
  • (Only for the installation) IBM i Product 5722WDS or 5770WDS, Option 31, Compiler - ILE RPG IV

3. Installation

When you download this utility from the site, you receive a PC file named
Unzipping this file, you get 2 files:
  • edbg.savf, the save file of utility EDBG
  • edbg.txt, the installation instruction
Follow the installation instructions in file edbg.txt.

4. Operation

Command EDBG/EDBG, when prompted, looks as follow:

                                  Enhanced Debug (EDBG)                        
 Type choices, press Enter.                                
 Program to debug . . . . . . . . PGM                       Name                
   Library  . . . . . . . . . . .               *LIBL       Name, *LIBL, *CURLIB
 Job number to be serviced  . . . JOBNBR     *              Number, *                      
Figure 1 - Command EDBG/EDBG

  1. If you have to debug program MYLIB/MYPGM in the current interactive job,
  2. just execute command

  3. If you have to debug program MYLIB/MYPGM in another job,
  4. you have first to find the job number of that job.
    You may proceed as follow:
    1. Enter WRKACTJOB SBS(subsystem_name), where subsystem_name is the name of the subsystem where the job to be debugged is running
    2. In the resulting screen, example:

                                   Work with Active Jobs                               
                                                                   10/30/21  14:27:49 
       CPU %:     7.3     Elapsed time:   00:06:52     Active jobs:   225             
       Opt  Subsystem/Job  User        Type  CPU %  Function        Status            
              CGIDEV2APA   QTMHHTTP    BCH      .5  PGM-QZHBMAIN     SIGW
              CGIDEV2APA   QTMHHTTP    BCI      .0  PGM-QZSRLOG      SIGW
              CGIDEV2APA   QTMHHTTP    BCI      .5  PGM-QZSRHTTP     SIGW
       5      CGIDEV2APA   QTMHHTP1    BCI      .0  PGM-QZSRCGI      TIMW
              CGIDEV2APA   QTMHHTP1    BCI      .0  PGM-QZSRCGI      TIMW
      Figure 2 - WRKACTJOB SBS(...)

      select with a 5 (WRKJOB) the job you are interested in, thus receiving the following screen:

                                       Work with Job                                  
       Job:   CGIDEV2APA     User:   QTMHHTTP       Number:   116778                  
       Select one of the following:                                                   
            1. Display job status attributes                                          
            2. Display job definition attributes                                      
            3. Display job run attributes, if active                                  
            4. Work with spooled files                                                
           10. Display job log, if active, on job queue, or pending                   
           11. Display call stack, if active                                          
           12. Work with locks, if active                                             
           13. Display library list, if active                                        
           14. Display open files, if active                                          
           15. Display file overrides, if active                                      
           16. Display commitment control status, if active                           
       Selection or command                                                           
      Figure 3 - WRKJOB

      Now you know the job number you care for. In the command line of this screen type command
      EDBG MYLIB/MYPGM 116778
      and press the Enter key.

    Once you get used with command EDBG, you will realize that your debugging speed has raised quite a bit.