Mr Mosely is, of course, correct.
But to be clear, this has nothing to do with Net.data itself, but simply the nature of STDIN. While it can be read like any other stream, the read consumes it, as happens with a data queue.
So the first application that reads it, empties it, whether that is PHP, ASP, Net.data, RPG, REXX or an API for example. No matter what application in any language is called subsequently, the cupboard is bare.

Peter


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Friday, 6 August 2010 7:30 a.m.
To: RPG programming on the IBM i / System i
Subject: Re: Net.Data -> RPG question.

Dave

I don't think POST data and GET data are retrieved from the same
placewhen doing CGI on the iSeries. Probably not on any web server. ASP
and stuff give you ways to get either, but not the i.

I forget the details, but we check both in our CGI stuff. Net.Data is
just a thin cover over CGI, after all.

I think you have to use QtmhGetEnv with the environment variable name of
'QUERY_STRING' to get the POST data. 'CONTENT_LENGTH' is not relevant
that I know of to POST data.

Vern

On 8/5/2010 12:07 PM, dmosley@xxxxxxxxxx wrote:
I have done your suggestion about passing the POST data directly, but was
HOPING to not do that.

What is odd about your comments of parent/child is that passing the data
in GET works just fine, but POST
doesn't.

Thanks, Dennis
dave

David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



"Dennis Lovelady"<iseries@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/05/2010 11:25 AM
Please respond to
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the IBM i / System i'"<rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Net.Data -> RPG question.






I don't believe the RPG program will run as a child in your current
environment. (If I'm wrong, skip to paragraph 2.) In that case, you
would
need to pass the POST data to the RPG program directly.

If the RPG runs as a child in your current environment: Do you know the
concept of exporting, and can it be applied here? This acts just like a
variable has not been exported. The parent cannot see it, but the
child(ren) cannot.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
The 50-50-90 rule: Anytime you have a 50-50 chance of getting something
right, there's a 90% probability you'll get it wrong.



Before I ask my question, please don't ask WHY I'm using Net.Data. It
is
what it is. :>

Anyway, I have a Net.Data script that is making a DirectCall to an RPG
program.
The call that I am making to the Net.Data script has POST data, and
when I
make the
call to the RPG program, to extract it out, via QtmhRdStin, it seems to
have disappeared.

However, doing a GetEnv for the CONTENT_LENGTH shows that it is in
there,
still. But, yet,
nothing comes out of the QtmhRdStin.




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.