You can add more program objects 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. 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.
Work with Module List System: SYSTEM01 Type options, press enter. 1=Add program 4=Remove program 5=Display module source 8=Work with module breakpoints Opt Program/module Library Type 1 weekday2 *LIBL *PGM DSPWKDAY MYLIB *PGM DSPWKDAY *MODULE Selected AABP1 *MODULE Bottom Command ===> F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel
Work with Module List System: SYSTEM01 Type options, press enter. 1=Add program 4=Remove program 5=Display module source 8=Work with module breakpoints Opt Program/module Library Type WEEKDAY2 *LIBL *PGM WEEKDAY2 MYLIB *PGM WEEKDAY2 *MODULE DSPWKDAY MYLIB *PGM DSPWKDAY *MODULE Selected AABP1 *MODULE Bottom Command ===> F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel Program WEEKDAY2 added to source debugger.
When you have finished adding program objects to the debug session, press F3 (Exit) from the Work with Module List display to return to the Display Module Source display. You can also use option 5 (Display Module Source) to select and display a module.
To add OPM programs to a debug session, use the Add Program (ADDPGM) command. A debug session can include up to twenty (20) OPM programs at any given time. You can add OPM programs that contain source debug data to the debug session by using option 1 (Add program) on the Work with Module List display. (This is true provided the debug session allows OPM source level debugging.) You can allow OPM source level debugging by starting the debug session and by using the OPMSRC parameter on the Start Debug (STRDBG) command. If the OPMSRC parameter was not specified on the Start Debug (STRDBG) command, activate OPM source level debugging. Do this by using the OPM Source Level Debug (OPMSRC) parameter on the Change Debug (CHGDBG) command. Alternately, you can change the value of the OPM source debug support option by using the SET debug command.