You want to be able to see when the client program hands off control to the service running in Enterprise Server.
The code that calls the service is contained in the MakeCheckAppt-proxy.cbl file. Because the program hands off control at two points in its execution – first to run the MakeAppt operation, and second to run the CheckAppt operation – set a breakpoint at each hand-off point in the code so you can step through the program from there.
call "InvokeService04"
This is the call that hands execution off to the Web service. You want to set a breakpoint on the code that executes just before it, which is:
move 256 to wsc-srvc-faultstring-len
call "InvokeService04"and set another breakpoint on the line of code that precedes it.
CBL_CANCEL
This line of code cancels MakeCheckAppt-proxy.cbl
This shows that all debug Web services are invoked by a request from the client.
This places an entry into the Debug view for the client application.
The client invokes a console, and waits for input.
| Service Address | leave blank |
| Supplemental Query String | leave blank |
| Username | leave blank |
| Password | leave blank |
| Operation | 1 |
| lnk_customer_name | Benton Riley |
| lnk_consultant_id | 8706 |
| lnk_time_slot | 5 |
| lnk_date.lnk_yyyy | 2525 |
| lnk_date.lnk_mm | 1 |
| lnk_date.lnk_dd | 1 |
The client application then resumes execution, and pauses on the breakpoint set on the move 256 to wsc-srvc-faultstring-len statement.
twice to step just past the
call "InvokeService04" statement and into
schedule.cbl, which opens in an Eclipse window.
until the debugger breaks on the
call "CBL_CANCEL" statement on line 181 in
MakeCheckAppt-app.cbl.
to terminate
MakeCheckAppt-app.dll execution.
Here you rerun the client, selecting the other operation to see that the appointment has been made.
| Service Address | leave blank |
| Supplemental Query String | leave blank |
| Username | leave blank |
| Password | leave blank |
| Operation | 2 |
| lnk_customer_name | Benton Riley |
| lnk_consultant_id | 8706 |
| lnk_date.lnk_yyyy | 2525 |
| lnk_date.lnk_mm | 1 |
| lnk_date.lnk_dd | 1 |
The client application then resumes execution, and pauses on the move 256 to wsc-srvc-faultstring-len statement.
repeatedly to step into
schedule.cbl.
a few more times to observe how the debugger moves through the code.
The appointment you set appears on the list in the console on line [00005] because it is the fifth appointment set for that day.
to terminate execution and stop debugging.
This concludes the tutorial.