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



XML-SAX is an RPG op-code added in V5R4.

You cannot provide input by specifying a pointer and length (no matter how the memory is allocated). You can provide an RPG string, or an IFS path.

If you use an RPG string, it's limited to 65535 -- which was the source of this thread. The OP wanted to know how to exceed that 65535 limitation. Since the XML-SAX op-code looks at the size of the RPG variable, NOT some external length that you pass it, it doesn't matter whether the data is allocated in automatic storage, heap storage, or teraspace, you still can't exceed 65535 (without upgrading to V6R1, that is.)

However, it WILL read IFS stream files that are longer than 65535 -- and since a user space can be treated as an IFS stream file, the OP could read his data into the user space, then provide the IFS path to the user space to make XML-SAX work.

I don't understand why you brought up teraspace, since the data is smaller than 16MB, the diff between teraspace and an SLS space is irrelevant here. Further, even if he did need to exceed 16MB, teraspace won't work with XML-SAX, since there's no way to tell it that the data is longer than 65535 unless the data is in an IFS stream file. I suppose if the 16MB did end up being a problem, he could read from MQ into teraspace (assuming MQ supports teraspace, that is) and then write it to a stream file (Which supports data longer than 16MB, while a user space does not) and then input that stream file into XML-SAX... but this all seems irrelevant to me, given that the data is only 800k long.

So your suggestion of SNL's "never mind" seems to apply here.


Steve Richter wrote:
what exactly is XML-SAX? Does it work with malloc allocated memory? If
it does, it would work with teraspace allocated memory. If it
doesn't, then in the words of the long ago character from saturday
night live, "never mind".


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.