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



One solution, which I implemented in my CGILIB (a CGIDEV2 service program)
is to provide a second cgiGetVarEx() procedure. This one does not have a
return value (other than '1'=Valid, '0'=Bad variable name). Instead, it has
four parms (instead of the two of cgiGetVar and zhbGetVar()). 
It is called like this:

   If     cgiGetVarEx('MYCGIVAR' : %addr(rtnvar) : %size(rtnvar))

Parm1 is the Form field name.
Parm2 is the address of the return variable or dynamically allocated buffer
to receive the return data.
Parm3 is the length of the return variable/buffer.
Parm4 is the occurrence of that variable (which is Parm2 in cgiGetVar and
zhbGetVar).

Then you can pass up to a 16 meg buffer or pointer to the buffer and it
works fine. 
If you're locked into CGIDEV2, which you probably are, you might consider
wrapping the zhbGetVar() proc in your own wrapper and doing something
similar to what I do in cgiGetVarEx().

-Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mel Rothman
Sent: Monday, February 23, 2004 8:43 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: FW: Have you seen this?

Steve, your supposition is correct: if ZhbGetVar returned only a 100 byte 
varying value, there would be no problem handling thousands of ZhbGetVar
calls 
in a program.

Of course, I can't change ZhbGetVar because:
   - a lot of user written code would break;
   - many users have requested the ability to return MORE than 32767 bytes. 
Reducing the returned size would only increase the number of requests and 
complaints.

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.