If you have *CHANGE authority, you can add programs and service programs to a debug session, or remove them from a current debug session.
For ILE programs, use option 1 (Add program) on the Work with Module List display (F14) of the DSPMODSRC command. To remove an ILE program or service program, use option 4 (Remove program) on the same display. When an ILE program or service program is removed, all breakpoints for that program are removed. There is no limit to the number of ILE programs or service programs that can be included in a debug session at one time.
For OPM programs, 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 Change Debug (CHGDBG) options, then you add or remove an OPM program using the Work with Module 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 when OPMSRC(*YES) is specified.
If you specified OPMSRC(*NO), then you must use the Add Program (ADDPGM) command or the Remove Program (RMVPGM) command. Only 20 OPM programs can be in a debug session at one time when OPMSRC(*NO) is specified.
Example:
This example shows you how to add an ILE C service program to, and remove an ILE C program from a debug session.
DSPMODSRC
and press Enter. The Display Module Source display appears.
If an ILE C/C++ program with debug data is in a debug session, the module with the main() function is shown (if it has a debug view). Otherwise, the first module bound to the ILE C/C++ program with debug data is shown.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.