The UpdHtmlVar prototype defines the value parameter as 1000 characters with these keywords: const varying options(*varsize).

It's possible that the 1024 character variable when trimmed still exceeded 1000 characters.

If you want to output variables greater than 1000 characters, use the UpdHtmlVar2 subprocedure.

The error you are receiving most likely has nothing to do with overflowing the dynamic buffer. Starting with CGIDEV2 Version 2004-09-02 17:40:18, CGIDEV2's HTML output buffer can be up to about 2 gigabytes.

If the version you are using is older than this, you might want to switch to the latest version ( see http://www.easy400.net/easy400p/maindown.html#d02 ).


Mel Rothman
CGIDEV2 Author




hrabar@xxxxxxxxxxxxxxxxx wrote:
We are using CGIDEV2 on our iSeries. One of our programmers has a program
the was writing MANY records out to an HTML.

He started to get an error that a space offset is outside current limit, or
that RPG procedure wrtsection in program CGIBIN/CGISRVPGM2 tried to
allocate storage with a length that was not a value between 1 and 16776704.

While researching this, we noticed that he was writing out a link in each
record using a variable with a length of 1024. This was setup to allow the
max characters.

WkLoc 1024 A
updHTMLvar('link':WkLoc)

He tried to cut down on the number of characters by changing the code to
the following:
updHTMLvar('link':%trim(WkLoc))

We were surprised that this did not solve the problem.

We next had him change the code to use a smaller work variable based on the
maximum length link he was sending:

WkA300 300 A
updHTMLvar('link':WkA300)

This code ran with no error.

Shouldn't %trim have cut down on the number of characters being sent to the
HTML section?
Or is there something in the CGI procedures that is causing the full size
of the variable to be used.



Leonard Hrabar
Senior Developer

Holy Name Hospital
718 Teaneck Road
Teaneck, NJ 07666
(201) 833-3000 ext: 5861

hrabar@xxxxxxxxxxxxxxxxx



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.