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



Ok this is getting weirder...

I've got two files...both have the BOM, when view via WRKLNK 5=Display
(F10-Hex)

405C5C5C 5C5C5C5C 5C5C5C5C 5CC28587 89959589 ************Beginni
EFBBBF3C 3F786D6C 20766572 73696F6E 3D22312E <?xml version="1.
3C737461 723A5368 6F775061 7274734D 61737465 <star:ShowPartsMaste

If I change the CCSID of the file from 819 to 1208, then DSPF ignores the
BOM, but you can still see it in the Hex
405C5C5C 5C5C5C5C 5C5C5C5C 5CC28587 89959589 ************Beginni
EFBBBF3C 3F786D6C 20766572 73696F6E 3D22312E <?xml version="1.0"
3C737461 723A5368 6F775061 7274734D 61737465 <star:ShowPartsMaste

And for one file, my RPG program using XML-INTO works and no longer gets
the error 302...

But for the other file, I'm still getting the 302!
Cause . . . . . : While parsing an XML document for an RPG procedure, the
parser detected an error at offset 0 with reason code 302.

Thoughts?

Charles



On Fri, Mar 20, 2020 at 1:12 PM Charles Wilt <charles.wilt@xxxxxxxxx> wrote:



Here's the realivent Java code
import java.util.zip.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.BufferedOutputStream;

try
{
GZIPInputStream gzipInputStream = new GZIPInputStream(new
FileInputStream(f));
OutputStream o = new FileOutputStream(oFile);

byte[] buf = new byte[4096];
int len;
while ((len = gzipInputStream.read(buf)) > 0)
{
o.write(buf, 0, len);
}
gzipInputStream.close();
o.close();
}
catch (Exception e1)
{
error = e1.getMessage();
return -50;
}

Charles

On Fri, Mar 20, 2020 at 11:57 AM Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

All,

I've got an XML file being received g-zipped up.

We're using Java to unzip it..
D unGZip pr 10i 0 extproc(*Java:DZ:'UnGZip')
D string o class(*Java:'java.lang.String')
const

But the resulting file has a CCSID of 819 and thus the BOM is not
expected.

Trying to use XML-INTO, we get error code 302 on the first character
(aka offset 0), which says that the first character is not a <

I'm surprised that the Java didn't set the CCSID to 1208...

Am I missing something?

Thanks!
Charles




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.