× 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.


  • Subject: RE: V3R2 to V4R2 - HTTP gets all messed up.... help?
  • From: Richard Hartmann <rgh@xxxxxxxxxx>
  • Date: Thu, 17 Sep 1998 09:40:52 -0400

The difference in calling an AS/400 CGI program using calling parameters is
passed only when the HTTP request data contains a ? followed by data with
unencoded equals.   Example: /cgi/pgmname?RPG   The HTTP method used on the
HTTP request must also be GET.  The CGI program is called with the parameter
RPG.  The V4R2 server used industry standard techniques to pass the calling
parameters to conform to the HTTP 1.0 protocol.   As a result, the parameters
are passed to the CGI program as is without padding.

A CGI fix is to use the QUERY_STRING environment variable to get the values
passed to the CGI program.  The QUERY_STRING environment variable is read in
RPG using QtmhGetEnv API.   This is documented n the Web Programming Guide.
The value returned in one of the output parameters from the API is the value
after the ? on the HTTP request.  In /cgi/pgmname?RPG, the RPG is in
QUERY_STRING as a string with length 3.   The QUERY_STRING can be used in place
of the calling parameters.

Richard Hartmann
---------------------------------------------------------------------------------
Date: Wed, 16 Sep 1998 13:32:03 -0500
From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com>
Subject: RE: V3R2 to V4R2 - HTTP gets all messed up.... help?

Ken, thanks for your help.

It has to be a bug, and it worked before even with sending seperate
paratmeters seperated by the "+" sign.  For example...

?RPG+0000001

will pass two parameters (or should..haha) to the *ENTRY portion of my
RPG program (RPG and 0000001).  But, it fills the last seven characters
of the first variable, which is 10 long, with X'00' instead of X'40',
which it did before.

I would use C, but we don't have a C compiler.  Also, speed doesn't seem
to be a problem for us using RPG/IV.  (Running on a 50S, and even or 30S
was lickety split!)

Thanks.. if you find anything, please let me know.  I've tried using all
the different modes on the EXEC statement in the HTTP configuration
(%%EBCDIC%%, etc) but the only one that made a difference was
%%BINARY%%, and then it was stuff I didn't want.

On V3R2, it had to have been doing translation differently, and now on
V4R2 it just doesn't work the same, and I'm getting frustrated...
YIKES!!!

Thanks again.


AS/400 Telnet Server and Client testing"
 Richard G. Hartmann       AS/400 TCP/IP & Server Development
  IBM T/L: 852-6731          IBM Mail: Richard Hartmann/Endicott/IBM
  Phone:   607-752-6731  Internet e-mail: rgh@us.ibm.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 thread ...


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.