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



Bartell, Aaron L. (TC) wrote:

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



Actually I was assuming that QtmhRdStin was doing proper allocation for me. Notice what I am passing in as the second parm to qtmhRdStin: qtmhRdStin(output: contentLength: bytesRead: ErrorDs);

Variable 'contentLength' has a value of 11,000,000 in my 11MB scenario.

Here is the documentation for QtmhRdStin:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/rzaie/rzaie
api_qtmhrdstin.htm


Given that information don't you think it should work?


What specifically about the documentation for "QtmhRdStin" would lead you to believe that it would allocate the storage for you? Note that you're passing in the receiving field by reference, and so the data should get written to that variable. You're telling the API by the value in the second parameter that the receiving field is big enough for that amount of data, and the API has no reason to suspect you of lying to it.


Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.