|
Michael,
>Thanks for answering. I am using an RPG ILE program and tried to retrieve the
>Query_String using the GetEnv api but nothing comes back. Am I maybe missing
>something in the html for the page the link is on? An instructor at the Boston
>Common said you can pass parms by doing something like
>http://-----PGMA.PGM?parm1+parm2 but i never got what you have to do to receive
>this in a program. Any Thoughts?
>Thanks in Advance
Ooh! Now I have to make it sound like I know what I am talking about
. . . Could it be that the Net.data macro is the piece of the puzzle
you are missing? I actually played around with this stuff until it
worked. So I will try to show my simple example. I am RPG ignorant,
however. I wrote my program in ILE C instead.
First of all, I have a link on a web page, which looks like this:
http://hdl/cgi-bin/db2www/web/macros/dril1/cmd1?WBS1=01&WLEV=2&TOC=999
99&TLEV=1&DWN=W
My Net.data macro, which is named 'dril1', looks like this:
%FUNCTION(DTW_SYSTEM) sys1 (IN WBS1, IN WLEV, IN TOC, IN TLEV, IN DWN)
{
%EXEC {
/QSYS.LIB/C40020.LIB/TEST6.PGM
%}
%}
%HTML(cmd1) {
<P>
@sys1(WBS1, WLEV, TOC, TLEV, DWN)
%}
The macro runs the C program TEST6 in the library C40020. Finally, the
program contains the following pertinent statements, which pick up the
environment variables WLEV and TLEV:
#include <qp0z1170.h>
int main(void) {
char *wlev;
char *tlev;
wlev = getenv("WLEV");
tlev = getenv("TLEV");
.
.
.
I hope this helps. Please let me know if I need to clarify something.
-- Carol
+=======================================================================+
| Carol Collins Sr. Network Administrator |
| WASTREN / Holmes and Narver Services, Inc. |
| 2597 B-3/4 Road |
| Grand Junction, CO 81503 |
| U.S. Dept of Energy Grand Junction Office |
| Internet: Carol.Collins@doegjpo.com |
| Phone : (970) 248-6524 |
+=======================================================================+
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
| and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| 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-2025 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.