Topic
No replies
SystemAdmin
SystemAdmin
1391 Posts
ACCEPTED ANSWER

Pinned topic COBOL XML PARSE command ERROR

‏2012-11-20T02:43:38Z |
I'm trying to use the XML PARSE command of ILE COBOL V5R3 but I have a problem.
When I try this example:

PROCESS NOMONOPRC CCSID(37).
Identification division.
Program-id. HXML.
Data division.
Working-storage section.
1 M.
2 pic x(40) value
'<?xml version="1.0" encoding="ibm-37"?>'.
2 pic x(40) value
'<msg >Hello, World!</msg>'.
Procedure division.
Display 'XML Event XML Text'.
XML Parse M Processing procedure P
ON EXCEPTION
display 'XML document error ' XML-CODE
End-XML.
Goback.
P.
If XML-Code = 0
Display XML-Event XML-Text
End-if.
End program HelloXML.

I obtain Exception. The values of registers are:

XML-CODE = 000000051 i.e. "The document was encoded in EBCDIC, and the document encoding declaration specified a supported EBCDIC encoding, but the parser does not support the CCSID of the COBOL source member."

I'dont know why the XML parser does not support the CCSID of my source member. The CCSID of my cobol source file is 37 , What way should I use to Parse command ? Thanks for your help.