There is an automatic feature for stepping. This feature automatically puts a service program into debug. This happens if the service program that is stepped into from another program in debug:
The service program is added to debug for the user, and the DSPMODSRC panel shows the procedure in the service program. From this point, modules in the service program can be accessed using the Work with Modules display just like modules in programs the user added to debug.
If you specify INTO on the STEP debug command, each statement in a procedure or function that is called counts as a single statement. You can start the step into function by using:
Example:
This example shows you how to use F22 (Step Into) to step into one procedure.
+--------------------------------------------------------------------------------+ | Display Module Source | | Program: T1520PG1 Library: MYLIB Module: T1520IC2 | | 47 if (j<0) return(0); | | 48 if (hold_formatted_cost[i] == '$') | | 49 { | | 50 formatted_cost[j] = hold_formatted_cost[i]; | | 51 break; | | 52 } | | 53 if (i<16 &&; !((i-2)%3)) | | 54 { | | 55 formatted_cost[j] = ','; | | 56 --j; | | 57 } | | 58 formatted_cost[j] = hold_formatted_cost[i]; | | 59 --j; | | 60 } | | 61 | | 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 | | Breakpoint at line 50. | +--------------------------------------------------------------------------------+
The next five statements of your program are run, and then the Display Module Source display is shown. If the third statement is a call to a function, the first two statements of the calling procedure run, and the first two statements of the function run.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.