|
Nothing special to do. Just use the GetEnv API and pass it the name of the environment variable you want to retrieve. In this case I'm guessing you're just pulling QUERY_STRING environment variables. That's pretty simple. I've got a wrapper for this API that makes it pretty easy to use as well to retrieve any environment variable. LEt me know if you want a sample. An even easier way is with the QzhbCGIParse API. It's intimidating at first, but once you get it going, it's not bad. I just finished writing a pretty cool wrapper for this API. So to get QS env. vars, all I do is. Variable = #CGIParse('-value field') and the data is retrieved. If the variable should be numeric, I use my Char to Numeric subprocedure. You can also use this for standard input, but it involves two steps.. 1. use the -init command to retrieve the standard input into query string variables. 2. use the PutEnv to put this data to query string env. var. 3. use -value command to retrieve the values as if it were QS data. Works slick. I plan on doing an article on it for MC, but if anyone wants the code, let me know. Bradley V. Stone Taylor Corporation - OASIS Programmer/Analyst Taylor Technology Warehouse - Webmaster http://icsm400.taylorcorp.com > -----Original Message----- > From: Gade_R_Reddy@consecofinance.com > [mailto:Gade_R_Reddy@consecofinance.com] > Sent: Monday, December 20, 1999 9:19 AM > To: RPG400-L@midrange.com > Subject: Re: CGI Programming > > > > Hey Guys, > > I have a dumb question about Environment Variables. > > I know why they are used for but i trying to run an example > which has a > HTML page passing data to my CGI program. > > Is there anything i need to Declare/Set the environment > variables on As400 > to accept the values from HTML page?. > > If somebody can explain me the part i need to do with > Environment variables > on As400, i would really really appreciate that. > > Thankyou Much. > Gade. > > > > > > > Jim Langston <jlangston@conexfreight.com>@midrange.com on > 12/16/99 06:01:38 > PM > > Please respond to RPG400-L@midrange.com > > Sent by: owner-rpg400-l@midrange.com > > > To: RPG400-L@midrange.com > cc: > Subject: Re: CGI Programming > > > You need to remember, when you use Pass and Exec, it is > remapping the location of the files. Say your site is > www.somesite.com > > The first line says, if someone points to > http://www.somesite.com/democgi/(some prog) > then let it go through, but get the actual files from > /QSYS.LIB/RPGISCOOL.LIB/CGISRC.FILE/CGIHTML.MBR, or in > Lib/file.mbr syntax, it is RPGISCOOL/CGISRC.CGIHTML > > The next line is a bit the same, if someone points to > http://www.somesite.com/cgibin/(somefile) > then actually send them to the library RPGISCOOL and run the program. > So, if they went to http://www.somesite.com/cgibin/myprog > what would happen > is the exec line would convert the "/cgibin/myprog" to > RPGISCOOL/MYPROG > and try to run the program MYPROG in the RPGISCOOL library. > > Make more sense? > > Regards, > > Jim Langston > > Gade_R_Reddy@consecofinance.com wrote: > > > I am new to the CGI programming on As400. and trying the > examples in the > > new Red Book on IBM web Site.( SG245402.PDF). > > > > I have a question about CGI Programing code mentioned in the book. > > > > Pass /democgi /QSYS.LIB/RPGISCOOL.LIB/CGISRC.FILE/CGIHTML.MBR > > Exec /cgibin/* /QSYS.LIB/RPGISCOOL.LIB/*.PGM > > > > I can understand the PASS line but what exactly is CGIBIN > in the Exec > command???. Is it a library i need to create seperately???. > > > > Please help > > 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 > +--- > +--- | 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.