Debug mode is a special environment in which the testing functions can be used in addition to the normal system functions.
To begin testing, your program must be put in debug mode. Testing functions cannot be used outside debug mode. To start debug mode, you must use the Start Debug (STRDBG) command. In addition to placing your program in debug mode, the STRDBG command lets you specify certain testing information such as the programs that are being debugged. Your program remains in debug mode until an End Debug (ENDDBG) or Remove Program (RMVPGM) command is encountered or your current routing step ends.
The following Start Debug (STRDBG) command places the job in debug mode and adds program CUS310 as the program to be debugged.
STRDBG PGM(CUS310)
You can use the Integrated Language Environment® (ILE) source debugger to debug original program model (OPM) programs. To create OPM programs that contain source debug data, specify the OPTION(*SRCDBG) parameter or the OPTION(*LSTDBG) parameter on the Create CL Program (CRTCLPGM) command. The source debug data is actually part of the program object.
To add OPM programs that get created containing source debug data to the ILE source debugger, use the Program (PGM) and OPM Source Level Debug (OPMSRC) parameters on the STRDBG command. To start a debug session with an OPM program created with source debug data, type:
STRDBG PGM(*LIBL/MYOPMPGM) OPMSRC(*YES) DSPMODSRC(*YES)