Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Prob receiving HTML variables

92 views
Skip to first unread message

Kathryn Webb

unread,
Jul 21, 2004, 3:22:11 AM7/21/04
to
I am currently writing a program using CGIDEV2 that requires
approximately 32,000 characters to be passed from the HTML form back
to an RPG program for processing.

The RPG successfully extracts the fields towards the top of the form
but when it gets further down the form, the details extracted are
blank (am estimating this happens around the 20,000 character mark).
If I input less data so it is passing fewer characters then the RPG
extracts more fields.

I am having difficulty determining whether IE 6.0 or CGIDEV2 is the
culprit, and what (if anything) can be done to fix it.

Any help is appreciated.

Thanks, Kathryn.

Bradley V. Stone

unread,
Jul 21, 2004, 10:13:11 AM7/21/04
to
I believe CGIDEV2 is the culprit. For that large of data you will want
to make sure you're using a POST (GET I believe is limited to 32k by the
browser) and then use the QtmhRdStin API. But that can only be called
once, so you're limited to the size of the receiver variable. If you're
on V4R5 or higher, you should be able to define the receiver variable as
65k instead of 32k and get it all in.

Then use the QtmhCvtDB API to parse all the data.

These are rare cases... most other forms won't be close to 32k or more.

You could also look at splitting up the form into two or more pages,
reading in some, then displaying a page, then reading in more on the
next page. Kind of like "Step 1, Step 2, Step..." pages...


Mel Rothman

unread,
Jul 21, 2004, 11:29:35 AM7/21/04
to
The best way to get and parse CGI input with CGIDEV2 is to use the ZhbGetInput
and ZhbGetVar subprocedures. They will handle 32,000 bytes of input without
problem. For examples of their use, see CGIDEV2 sample programs TEMPLATE3,
TEMPLATE4, and TEMPLATE5.

If you are using Getinput and Cvtdb you could be running into buffer size
limitations and buggy IBM code:
- GetInput has a maximum 32767 byte buffer size; and,
- QtmhCvtDb used by CvtDb is notoriously buggy when parsing
large numbers of variables.

For additional help with CGIDEV2 please visit
- Easy400 web site at http://www-922.ibm.com and
- Easy400 Yahoo Group at http://groups.yahoo.com/group/Easy400Group/

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.

Kathryn Webb

unread,
Jul 21, 2004, 10:17:13 PM7/21/04
to
Thanks for your help with this guys. I still have not determined the
exact reason for the problem but have managed to get around it...

Since the textareas being used in my form are so large (up to 3000
chars each) I needed to do something to speed up the javascript
validation. To do this I load a hidden field with the original text
area details and only perform validation on the screen field when
these values are different. For this comparison to happen the hidden
fields were named so they could be referenced in the Javascripts, but
this was causing them to be posted to the RPG as well even though they
didnt need to be (so i would have been posting close to 65000
characters of data!).

I have now disabled the hidden fields so they are no longer being
posted by the form and this seems to have fixed my problem.


Mel Rothman <m...@rothmanweb.com> wrote in message news:<10ft2v0...@corp.supernews.com>...

0 new messages