× 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.



We *used* to modify the program and put a DLYJOB 30 command in near the top of the RPG program to be debugged. Then WRKACTJOB shows a single web server job in delayed status, and we can get into STRSRVJOB and STRDBG before the delay runs out. The trick is remembering to remove the DLYJOB before promoting it back to production.

This isn't a good idea for production jobs. Many of the developers here have switched to RDP for debugging Web jobs, and that's the way I teach people to debug them.

John Maassel
Lead Programmer/Analyst
Bob Evans Farms, Inc


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Darryl Freinkel
Sent: Friday, August 10, 2012 2:22 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: How do you debug CGIDEV2 programs

Debugging a CGIDEV program is not an easy process. The reason for this is that you will not know which job to set your debug session on. Typically, the server side programs (RPG) are run in subsystem QHTTPSVR. If you are using vanilla configurations of CGIDEV2, you will see several jobs running in QHTTPSVR with the job name CGIDEV2APA. There will be at least 2 jobs that will service your call and depending on what is going on in your system there could be more. The problem is which job will be executed when you run the call.

You could use the green screen STRSRVJOB and STRDBG, but which job are you going to monitor. There is also the Java debugger which essentially has the same issue.

I found the best way to debug a CGI program is to use one of the WDSc/RDi/RDp tools from IBM/Lotus. There you can start a SEP (Debug(service Entry)/Service entry point) which does the best job of finding and debugging your program. It automagically locates and debugs the program from whichever job it happens to be called from.

Darryl Freinkel | Assignment 400 Group, Inc.
Tel: 770.321.8562 ext 111 | Fax 770.321.8562



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.

________________________________

Notice from Bob Evans Farms, Inc: This e-mail message, including any attachments, may contain confidential information that is intended only for the person or entity to which it is addressed. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.