Exercise 5.5: Stepping into a program

Before you begin, you must complete Exercise 5.4: Monitoring variables.

The Debugger allows you to step over a program call or step into it. When you step over a program call, the called program runs and the Debugger stops at the next executable statement in the calling program. You are going to step into the PAYROLLG program.

To step into a program:

  1. Click the Step into icon on the Debug toolbar.
    Step into

    The source of PAYROLLD is displayed. Depending on the option you used to compile the program (*SRCDBG or *LSTDBG for RPG, or *SOURCE, *LIST, or *ALL for ILE RPG), this window displays either the Source or Listing View.

    If you specified an incorrect parameter for the CALL program command, you will see this error message.
    Call Program window
    Complete the same steps as covered in the section called Error Handling in Exercise 5.4: Monitoring variables.

  2. Right-click anywhere in the Source view.
    Show Listing
  3. Click Switch view > Show *LISTING on the pop-up menu.
    Listing view of PayrollD
  4. Page down in the source and take a look at the expanded file descriptions.

    You don't have any /Copy member in your PAYROLLD program but these would also be shown in a Listing view. Switch back to the Source view.

  5. Right-click anywhere in the Source view.
  6. Click Switch view > Show *SOURCE on the pop-up menu.

You have stepped into PAYROLLD program, switched the view from source to listing and back to source and now you are ready to begin Exercise 5.6: Listing call stack entries.