View previous topic :: View next topic
|
Author |
Message |
pleonard
New User
Joined: 20 Sep 2006 Posts: 19
|
|
|
|
I put EBCDIC in place of UTF-8 in the file, keep the MOVE FUNCTION DISPLAY OF with DBCS option (it is required when we use DISPLAY OF function) however, I got xml-code=317 again making move from ASCII to EBCDIC. Attempting to move from EBCDIC to ASCII I got xml-code=83. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The 83 is promising -- it indicates the XML parser recognizes the file as being ASCII but the encoding didn't match -- try encoding='iso8859-1' for this file since that would indicate Latin-I ASCII.
Also, note that error codes 1 to 99 are error codes that XML handles and supposedly allows you to continue; have you checked the output field with the 70 or 83 error codes? |
|
Back to top |
|
|
pleonard
New User
Joined: 20 Sep 2006 Posts: 19
|
|
|
|
I changed the file to be 'iso8859-1' and resubmit and got xml-code=317. How can I interpose the xml-code 70 or 83 in my program ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
You've hit the limits of my knowledge -- if there's anybody with XML expertise at your site, you need to talk over your problem with them. The 317 is not an error that can be continued; 70 or 83 allow you to set XML-CODE to zero and continue processing according to the manual.
The error codes you've posted are consistently encoding conflict errors -- where the file is EBCDIC and the encoding= option of XML does not reflect an EBCDIC encoding, or the file is ASCII and the encoding= option does not reflect an ASCII encoding. The difficulty is finding an encoding string (819 or iso8859-1 or whatever) that allows the ASCII file to be processed, or the EBCDIC file to be processed with encoding=1047 or whatever: EBCDIC would be better since the mainframe would allow you to view the output but getting it processed would be the first thing. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To return to an earlier part of the topic - it may be helpful to try re-creating the file and using this new file for continued testing. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
OK, I looked at an old program I wrote a year and a half ago -- the data does not include any encoding=. So make sure your file is EBCDIC, remove the encoding= from the first line, and run your XMLPARSE again. This should get you past the XML error -- I got XML-CODE=0 by doing so.
If you absolutely have to have the encoding, make sure the file is in EBCDIC, check the compile listing for the CODEPAGE used, and set the encoding to that CODEPAGE -- I thought we used 1047 but found out 1140 is selected by looking at a compile output. |
|
Back to top |
|
|
pleonard
New User
Joined: 20 Sep 2006 Posts: 19
|
|
|
|
I tried this one too. In my last test I removed the total header from XML file but for both (with header and without encoding=utf-8) I got XML-CODE=-1. I'm not sure which is the encoding made to this file because it is obtained from another program (that generates this XML to me). Maybe this program can be messed up this file I'm not sure. Indeed my program is attempting to process a XML message and their encoding are different between them. |
|
Back to top |
|
|
|