Kendall,
I've known about Hercules for some time, but never thought of getting in touch with them, till now. Good suggestion. I'll keep them in mind for future reference.
My problem with the prolog and the UTF-16 encoding was strictly me heading off into the weeds on this.
I really did not understand what it meant to specify an encoding as UTF-16...that each character is represented by 16 bits. Not very bright on my part. I was thinking more of UTF-16 meaning that the encoding is in hexadecimal, a numbering system that uses 16 values to count.
The reason I headed off into the weeds in the first place was me not understanding an error I got when I tried to create a new Basex database with the xml I created on z/OS.
Right now, I will be translating the xml from EBCDIC to ASCII and load the database using the translated xml. Once I get it working, I hope to be able to skip the translate on the mainframe side, and get Basex to do that. The translate instruction on MVS is one of the more cpu intensive instructions, and it would be good to get those cycles offloaded, if possible.
-- Dave
On 10/4/2017 12:08 PM, Kendall Shaw wrote:
On 10/3/17, 7:57 AM, "basex-talk-bounces@mailman.uni-konstanz.de on behalf of Christian Grün" <basex-talk-bounces@mailman.uni-konstanz.de on behalf of christian.gruen@gmail.com> wrote:
Hi Dave (cc to the list), > I am creating xml on an IBM mainframe. The code page used on mainframes > is defined as EBCDIC 0037. https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_EBCDIC-5F037&d=DwIBaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=miid_BqIV7JLoVEU1Rw6R1qalH8OKsZl1ca87e9HMcM&s=PTtt72n66Y0yBVLX3hbg9q6mV2FP3ZfO-PYn7C-PoWU&e= As EBCDIC 0037 is limited to 256 characters, a simple mapping should suffice to convert your text to ISO-8859-1 (see the mapping table in the Wikipedia entry you referenced). It should be lightning fast, no matter if you do it in assembler or in XQuery.
Dave, I, for one, am interested to know what you find, because it is an unusual (for me) problem and fun.
The Hercules people might have advice because they deal with mainframe software using gnu tools.
Kendall