The output buffer is dynamically allocated and reallocated, if necessary.  So, 
it can't get "full" until it exceeds 16 MB.  I have written hundreds of 
thousands of bytes to the browser with one execution of a CGI program.

Incorrect HTML is a likely source of the problem.

The failure to write the *fini section would likely cause no HTML to be sent to 
the browser, not partial HTML.

Writing the *fini section prematurely could cause the problem.  For example, if 
you intend to write sections one through six:
  WrtSection('one two three')
  WrtSection('four five six *fini')
but incorrectly write
  WrtSection('one two three *fini')
  WrtSection('four five six')
what happens is:
  sections one, two, and three are buffered
  sections one, two, and three are sent to the browser
  the buffer is cleared
  sections four, five, and six are buffered

You can use the CGIDEBUG *ON command to turn on CGIDEV2's debugging output.  
Then run the program.  Then run CGIDEBUG *DSPDATA to view the debugging output, 
which includes all the output buffered by WrtSection.

You can also use the ILE debugger (use STRSRVJOB first) and step through your 
code.

Regarding activation groups, setting on LR, etc., if the program runs 
frequently, I generally recommend a named activation group and NOT setting on 
LR.  Perform first time operations the first time the program runs (opening 
files, setting up structures, arrays, etc.).  On subsequent runs, reinitialize 
whatever is required and continue processing.  This technique results in much 
better performance because file opens and closes are avoided, creating and 
destroying activation groups is avoided, and reprocessing the HTML template(s) 
is avoided.  If multiple CGI programs are to use the same named activation 
group, make sure all those programs uses exactly the same HTML template(s).

These recommendations are also discussed in the Easy400 Yahoo Group, message 
number 208, http://groups.yahoo.com/group/Easy400Group/message/208 .

Also see the Easy400 site's FAQ number 26, 
http://www.easy400.ibm.it/cgidev2o/faq26.htm?ts=ts2002711202455 .


--
Mel Rothman, CGIDEV2 Author
http://www.easy400.ibm.it/en


Justin Houchin wrote:
>
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Hi Everyone,
> I am using CGIDEV2, half of my Web Page is getting written. I am
> positive the program is working correctly. Is it possible that the HTML
> buffer is full? If so what can I do about this???
>
> Justin Houchin
> Programmer and Web Developer
> ReliaTek, Inc
> justin@reliatek.com
>




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.