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