Im running out of ideas on a project that seems so simple. I cant seem to be able to execute the CGI RPG program. I followed all examples and advice from the redbook, newsgroups, Midrange and News400? The CGI example program was taken from Midrange 1/1998. ?Writing Your First RPG CGI Data Entry Program? The program seems to be short, and to the point. Unfortunately, the article does not have the source for the HTML. What have I done: 1. enable the Get & Post access methods 2. granted object authority to all objects used for the project (QTMHHTTP and QTMHHTP1) 3. added the Exec directive Map /* /directory/* Exec /QSYS.LIB/CGI.LIB/* /QSYS.LIB/CGI.LIB/* Pass /directory/* What happens: I can display a web page stored in IFS. I can click and go to another web page. I can display a report from a spool file converted with cpysplf. What Doesn?t happen: I can click and go to a web page that contains the FORM statement. (the rpg program I expect to run on the AS/400 is CGI/CGIRPG01. - I enter data and click the submit button. At this point I expect the server to call the CGI program. Instead I get a new page from the browser, cannot display page. HTTP 500 error. I know the rpg program was not even executed because I checked the ?days run? from the DSPJOBD, which shows 0. Basically, I feel my problem lies with the configuration somewhere. I suspected I need the library CGI in the library list of the user profile (QTMHHTTP and for cgi programs QTMHHTTP). But then again the call is qualified in the FORM statement. Sometimes I feel like the server is just trying to display the CGI program as a HTML page. This is very hard to debug, I cant! All I can do is check my spelling and review my implementation and methods. Can anyone just kick around some ideas I might check. tia joe mcdonald cgm@lconn.com
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
CGI execution problem
Collapse
X
-
CGI execution problem
After checking the configuration in -Request Routing- I did qualify the program name using the "Exec". Basically, I made a typo in my post. Should have posted: Exec /QSYS.LIB/CGI.LIB/* /QSYS.LIB/CGI.LIB/*.PGM However, Bradley pointed out in the newsgroup, that I was maping everything to the /directory/ directory. Basically, my "Map" statement mapped the -FORM "POST"- to /directory/CGI.LIB/PGMNAME.PGM, (the "Exec", following after, never have a chance to map it). Understanding now how the "Map" can effect following additional directives (terminating at the "Exec" and "Pass"), the Webmaster guide examples are somewhat more clear. I havent tried it yet, but I know its got to workthanks joe mcdonald cgm@lconn.com
Comment
Comment