Exercise 7.2: Starting a Debug session using service entry points

Before you begin, you must complete Exercise 7.1: Introducing the iSeries Integrated Debugger.

In this exercise you will use service entry points to debug a Web application. The service entry point feature is designed to allow easy debugging of Web applications that invoke business logic written in RPG, COBOL, CL, or even C or C++. The service entry point is a special kind of entry breakpoint that can be set directly from the Remote System Explorer. It is triggered when the first line of a specified procedure is executed in a job that is not under debug. Service entry points allow you to gain control of your job at that point. A new debug session gets started and execution is stopped at that location.

To start a debug session:

  1. In the Remote System Explorer perspective, expand the iSeries server icon (s400a) if not already expanded.
  2. Expand iSeries Objects if not already expanded.
  3. Expand the Library List if not already expanded.

    If prompted, type your User-ID and password.

  4. Expand the library WSSLABxx if not already expanded.

    You will see all objects in this library.

    Now you will start the debug session and set a service entry point.

  5. Right-click GETDATA.*pgm.rpgle.
  6. Click Debug (Service Entry) Point > Set Service Entry Point on the pop-up menu.

    A message displays indicating the service entry point entry was successful.
    Debug Perspective

  7. Click OK.
  8. Click the Web Browser tab to switch back to the Web browser.
  9. Type 0010100 in the Enter customer number field.
  10. Click the Submit button, which will invoke GETDATA*pgm.rpgle on the iSeries host.

    At this point, the Service Entry point is hit and the debug session is started.
    Debug Perspective

    Notice that it also opens an instance of the GETDATA source code in the debug editor. You now have the access to debug this source.

    Let's look at some more debug features.

You have started a debug session with service entry points and now you are ready to begin Exercise 7.3: Adding and deleting breakpoints.