|
Do you have the initialization in there? Does that prolog3 member contain the call to the initialization? I don't recall what CGIDEV2 calls its initialization routine, something odd like zhbInput() or similar, I think. -Bob -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ricky Thompson Sent: Tuesday, November 16, 2004 11:35 AM To: 'Scott Klement'; 'RPG programming on the AS400 / iSeries' Subject: RE: CGIDEV2 question Yes I changed it. I can make the demos work with CGIDEV2 but this one has me stumped. At the least the request field should have "GO" in it but it's blank too. I know it's halfway working because it displays my form but after you click the submit button it does not work. I does put the following on the url line: http://..../cgi-bin/yourname.pgm?REQUEST=GO&YRNAME=Test So I know it's posting just the RPG is not reading it. I know it's something simple but I'm not sure what. /copy cgidev2/qrpglesrc,hspecs /copy cgidev2/qrpglesrc,hspecsbnd FRMSPRT04 O F 132 PRINTER EXTFILE('RMSFILES#/RMSPRT04') /copy cgidev2/qrpglesrc,prototypeb /copy cgidev2/qrpglesrc,usec /copy CGIDEV2/qrpglesrc,variables3 D request S 2a D name S 20a C CallP wrtjobdbg(*on) C* CallP SetNoDebug(*off) /copy CGIDEV2/qrpglesrc,prolog3 /free clrhtmlBuffer(); gethtml('QHTMLSRC':'CGILIB':'YOURNAME'); request = zhbgetvar('REQUEST'); name = zhbgetvar('YRNAME'); except error; if name <> ' '; updHTMLvar('name': name); wrtsection('result'); /copy CGIDEV2/qrpglesrc,prolog3 /free clrhtmlBuffer(); gethtml('QHTMLSRC':'CGILIB':'YOURNAME'); request = zhbgetvar('REQUEST'); name = zhbgetvar('YRNAME'); except error; if name <> ' '; updHTMLvar('name': name); wrtsection('result'); else; wrtsection('start'); endif; wrtsection('*fini'); *INLR = *ON; /end-free ORMSPRT04 E error 1 O 'Request = ' O request ORMSPRT04 E error 1 O 'Name = ' O name /$start <html> <head> <title>Enter Your Name</title> </head> <body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0> <table> <tr> <td><h1>What is your Name</h1></td> </tr> </table> <form method="GET" action="/cgi-bin/yourname.pgm"> <INPUT type="HIDDEN" name="REQUEST" value="GO"> Enter Your Name <INPUT TYPE="TEXT" NAME="YRNAME"> <INPUT TYPE="SUBMIT" VALUE="Enter"> </form> /$resultform -----Original Message----- From: Scott Klement [mailto:rpg400-l@xxxxxxxxxxxxxxxx] Sent: Tuesday, November 16, 2004 11:25 AM To: RPG programming on the AS400 / iSeries Cc: Ricky Thompson Subject: RE: CGIDEV2 question Ricky, Forgive me, but I don't see where you have code to read the contents of the 'YRNAME' variable in your RPG program? Try changing your code to look like this: name = zhbgetvar('YRNAME'); Bob Cozzi already mentioned this, but maybe you didn't see his message. --- Scott Klement http://www.scottklement.com On Tue, 16 Nov 2004, Ricky Thompson wrote: > Even after fixing this and changing the names to capital it comes back > blank. I'm just stumped. It puts on the address bar the following: > http://..../cgi-bin/yourname.pgm?REQUEST=GO&YRNAME=Test but the RPG never > retrieves the variables? Really strange. > > I'll check your web site too... > > Thanks > > date: Mon, 15 Nov 2004 16:34:19 -0600 > from: "Bob Cozzi" <cozzi@xxxxxxxxx> > subject: RE: CGIDEV2 question > > Ah, you know you've got the "name" form field spelled wrong, right? > > <INPUT TYPE=TEXT NAME="yrname"> > Is not the same as... > name = zhbgetvar('name'); > > -Bob Cozzi > -- This is the RPG programming on the AS400 / iSeries (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.
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.