|
Find the job that is running your CGI program, start a service program for that job, then start debug for the program and set your breakpoints. Then do your web thing and when it executes it should break as normal. Kinda like debugging a batch job. Here's a tip... because more than one job can run your CGi program within the instance, end the HTTP server instance and then start it again with the parameters '-minat 1 maxat 1'. This will ensure that only one job in your instance will run CGI programs. The job you want to start a service job, when the job log is viewed should say something like: "Job 058692/QTMHHTTP/xxxxxxxx started on 12/20/99 at 08:23:11 in subsystem QHTTPSVR in QHTTPSVR. Job entered system on 12/20/99 at 08:23:11. This is a CGI job for IBM HTTP Server instance xxxxxxx." You do NOT want to start a service job for the job that says: "This is a multiple thread capable CGI job for..." The key here is multiple thread capable. This if for Java stuff. I did an article on this for AS/400 NetJava Expert a few months back entitled "CGI Programming: A Bug's Life". If you have backissues, it explains this process a little more throuroughly. Bradley V. Stone BVS/Tools - www.bvstools.com Netshare400 - www.netshare400.com > -----Original Message----- > From: Gade_R_Reddy@consecofinance.com > [mailto:Gade_R_Reddy@consecofinance.com] > Sent: Monday, December 20, 1999 1:43 PM > To: RPG400-L@midrange.com > Subject: RE: CGI Programming > > > > How can i debug a CGI program???. > > Thanks > Gade. > > > > > > "Stone, Brad V (TC)" <bvstone@taylorcorp.com>@midrange.com on 12/20/99 > 11:31:58 AM > > Please respond to RPG400-L@midrange.com > > Sent by: owner-rpg400-l@midrange.com > > > To: "'RPG400-L@midrange.com'" <RPG400-L@midrange.com> > cc: > Subject: RE: CGI Programming > > > If your web page that is calling the CGI program uses the GET method, > you'll > have QUERY_STRING available to your program using the GetEnv > API without > doing anything. Most other environment variables are just > there for the > taking, so to speak. > > For CGI programming, you should be using the xxxENVVAR commands. You > should > use the QtmhGetEnv (what I call GetEnv) API. Then you use > the QtmhCvtDB > API > to convert them to usable data. > > As stated before, an alternative to the GetEnv then CvtDB > method is to use > the QzhbCGIParse API. > > They're not dumb questions... I just hope this makes sense. ;) > > Bradley V. Stone > BVS/Tools - www.bvstools.com > Netshare400 - www.netshare400.com > > > -----Original Message----- > > From: Gade_R_Reddy@consecofinance.com > > [mailto:Gade_R_Reddy@consecofinance.com] > > Sent: Monday, December 20, 1999 10:47 AM > > To: RPG400-L@midrange.com > > Subject: RE: CGI Programming > > > > > > > > Does the Query_String variable is created automatically by > > the CGI program > > Or do i have to add by using ADDENVVAR command??. How do i create a > > variable???. > > > > When would we use these commands ADDENVVAR, CHGENVVAR,WRKENVVAR.???. > > > > Sorry to ask such dumb questions. > > > > Thanks. > > Gade. > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- > > > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.