× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Service entry point breakpoints are the ticket, as Bob says. You have to at least be on V5R3. You can also use them in green-screen debugging, although not quite so easy as in the recent releases of WDSC and RDi or RDp.

For the green-screen method, I do this -

1. STRDBG for your program - probably UPDPROD(*YES)
2. Put my cursor on the line where I want it to break, then press F6 - this gets me a line number that is "right"
3. On the command line, type sbreak line-number user qtmhhtp1 (that is the usual user for CGI jobs, you would not be debugging anything else, right?)
4. Press F12
5. Start your server and/or do the thing in the browser that you want to debug

You'll get a message in your job that says the SEP was reached. In the message is the STRSRVJOB you need to run.

I do the following. It is harder to describe than to do -

0. Put cursor on message and press F1
1. Copy the STRSRVJOB to the clipboard
2. Press the ATTN key (Shift-Esc on my keyboard) and press Enter
3. Take option 1 and press Enter to go to alternative job
4. Sign on
5. Paste the STRSRVJOB command and press enter - maybe CALL QCMD first
6. STRDBG the same as above - it will show you where it stopped
7. Put cursor on that line and press F6
8. Press F12
9. ATTN option 1 and press Enter to go to original job
10. Press Enter twice to release the job
11. ATTN option 1 and press Enter to go back to alternative job - it should be positioned at the breakpoint
12. Walk through the code as usual

HTH
Vern

On 2/22/2011 10:52 AM, Bob P. Roche wrote:
If you are using RDP or WDSC, Service entry points are the way to go in
debugging HTTP jobs.



From:
"Tom Deskevich"<thomas.l.deskevich@xxxxxxxxxxxxx>
To:
"IBM System"<rpg400-l@xxxxxxxxxxxx>
Date:
02/22/2011 10:25 AM
Subject:
Debug an RPG program in batch. QHTTPSVR sub system.
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



I found these instructions in the archives for debugging a program in
batch.

1. Submit job to run in batch with HOLD(*YES).
2. Use WRKSBMJOB to obtain information about the job you want to
debug,that is: ? Job Id ? User Name ? Job Number
3. Enter the command STRSRVJOB for the Job above using the information
thatyouretrieved via WRKSBMJOB.
4. Enter the STRDBG command for the program that the batch job is
running.Thesource view of the program is displayed.
5. Press F21 to obtain a command line.
6. Enter WRKSBMJOB from the command line to release the batch job -
aSystemMessage will appear allowing you to press F10 to enter Debug
commands orEnter to run the program.
7. Press F10 - a Command Entry screen will appear.
8. Use DSPMODSRC from the Command Entry display and set breakpoints
wheredesired.
9. Exit DSPMODSRC (F3).
10. Exit the Command Entry screen (F12) - the System Message from Step 6).
willappear again.
11. Press enter to run the program.
12. Program will now halt at breakpoint.
13. Debug program as normal.14. When the program/Job has completed
execution, close out the processwithENDDBG and ENDSRVJOB.

But my job is running in a thread under the QHTTPSVR sub system.

The user will request to view an image using an internet application,
which will trigger RPG programs to execute.
I want to debug those RPG programs when they run.

Should the above instructions work for me also?

Tom Deskevich
INFOCON
814-472-6066
Fax 814-472-5019

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.