Bartell, Aaron L. (TC) wrote:

1) In the middle of the procedure, you allocate some storage

assigning the address to variable PTR. You then assign another address to PTR in the next statement, which means you lose addressability to the storage allocated.


Hmmm. . . I see what you mean.  I was hoping it would take the contents of
%Addr(output) and put it in variable 'ptr', but I can see that you are
right, it will just replace the address with that of 'output'.  I have taken
that line of code out and it still works as expected.


2) A little later, there's a MONITOR group, and the ON-ERROR clause

calls the exception "Error reading Standard Input". But the call to qtmhRdStin is before the start of the MONITOR group.


Fixed, thanks.


Since you claim your code works up to 11MB, can we assume you

haven't posted the working code yet to your web site? Maybe I'm missing something, but from a quick inspection, it looks like this code can't handle files over 32K.


The correct code is out there
(http://mowyourlawn.com/temp/CGI_readToFile.txt), and after this email I
will post the changes made because of your replies. It works, I am doing
some pointer arithmetic in that FOR loop so that is why I can get more than
32K. Which part of it is incorrect as far as size limitation goes?
Obviously you know RPG better than me so I am curious why you don't think it
shouldn't work when I have definitely been able to POST 11MB XML documents
to it??



I was surprised it works because of problem #1 above. I would expect that you shouldn't be able to read 11M of data into a 32K variable, unless you're overwriting the subsequent locations in memory. You may be just very lucky that you're not overwriting something important. I think you still need to dynamically allocate all the storage you need and read into that.


Cheers! Hans



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.