× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter,

When you create a link like this, all data after the question mark can be
retrieved by the calling program as environment variable QUERYSTRING (I take
it that that is why you use data structure EnvDta).  The common way to
identify parameters to the CGI program is to use name-value pairs, e.g.:

Eval      WebOut = '<a href="http://pacnet/cgi-rpg/FD003R4?'
          + 'location=' + %trim(Location) + '&'
          + 'mfitem=' + %trim(mfitem) + '&'
          + 'mordno=' + %trim(mordno) + '">'

With location '1', mfitem '1364647' and mordno 'M111110' this would evaluate
to:
<a
href="http://pacnet/cgi-rpg/FD003R4?location=1&mfitem=1364647&mordno=M11110";
>

The CGI program can parse the query string into the individual parameters
through QzhbCGIParse or QtmhCvtDB as Bradley mentioned.

Joep Beckeringh


----- Original Message -----
From: <Peter_Vidal@pall.com>
To: <rpg400-l@midrange.com>
Sent: Wednesday, February 27, 2002 2:55 PM
Subject: Re: CGI-RPG Parameters with different sizes


>
> Joep:
>
> My CALLER program (FD003R) creates dynamically an HTML page and a link to
my
> CALLED program (FD003R4).  The link is created as follows:
>
> Eval      WebOut = '<a href="http://pacnet/cgi-rpg/FD003R4?'
>           + %trim(Location)
>           + %trim(mfitem)
>           + mordno
>
> In here, (Location) is 5 long, (mfitem) is 15 long and mordno is 7 long,
all
> character fields.  If this is the case, I should be sending just one field
with
> these three values in it, isn't that right?  If that is the case, that
means
> that having a data structure in the CALLED program will not help me in
identify
> these three parms that are coming in(Thinking out loud)
>
> I am about to analyze the API QzhbCgiParse but, can you correct me in my
> previous thoughts and if there is a logical answer about how to handle
> effectively this one field into the three corresponding parameter values
that
> are inside?
>
> <-------------------------------->
> Peter,





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.