The 3030 is found in the XML System Services Guide and means "An incorrect character is found in element content." XRSN_CONTNT_CHAR_INVALID You could have bad data (such as hex 00) or Given its actual usage under XML System Services (XMLSS), it should really be defined as PIC 9(9) COMP-5, that is to say as an unsigned fullword binary field, containing two PIC Answer The Cobol manuals actually notes that XML-CODE is defined as PIC S9(9) USAGE BINARY, so it's a 4 byte field, not the 5 bytes one would expect for a packed-decimal Parent topic: Part 4: Appendices Related information Concepts of the COBOL Language Send feedback about this topic navigate to this website
The request cannot be fulfilled by the server The request cannot be fulfilled by the server The request cannot be fulfilled by the server The request cannot be fulfilled by the or you can write an explicit divide (which is actually implemented as a shift by the compiler, as it recognizes 65536 as a power of 2): 01 XML-RETURN-CODE PIC 9(4) COMP-5. How do I break up the 5 byte field into the two 2 byte fields documented for the XML System Services parser? CALL "SPRINTF" USING BY REFERENCE HALFWORD-FMT BY VALUE XML-REASON-CODE RETURNING HALFWORD-HEX DISPLAY 'Reason code: ' HALFWORD-HEX By this method the XML-CODE of 798723 translates to return code 12, reason 3003 (Namespace
When I take the S(9)9 field and move it to a display field I get the number 000798723. Watson Product Search Search None of the above, continue with my search Interpreting the XML System Services return/reason code in Cobol Technote (FAQ) Question When I perform an XML parse in To discover which character is bad, XML PARSE xxxx ON EXCEPTION ADD 1 TO LENGTH OF XML-TEXT GIVING ERROR-POINT DISPLAY "Byte " ERROR-POINT " of " XML-TEXT " is bad". Content As an example, let's decode 798768. 1.
Related information XML System services COBOL Prog Guide Appendix D COBOL migration Document information More support for: Enterprise COBOL for z/OS Runtime Software version: 4.1, 4.2, 5.1 Operating system(s): z/OS Reference Related information Some XML-CODE values are not documented by Cobol Appendix B. [XMLSS] Reason Codes Listed by Value Cross reference information Segment Product Component Platform Version Edition Software Development COBOL Compilers Support is provided for the following exception codes: 1 The parser found an invalid character while scanning white space outside element content. 2 The parser found an invalid start of a DIVIDE 65536 INTO XML-CODE GIVING XML-RETURN-CODE REMAINDER XML-REASON-CODE.
You can either write one in Cobol, or use the C library function sprintf() along the lines of: 01 HALFWORD-FMT PIC X(5) VALUE Z'%04X'. 01 FILLER. 02 HALFWORD-HEX PIC X(4). 02 MOVE XML-CODE to XML-CODE-BASE. The value of the reserved word XML-CODE is a very large number such as 798768 or maybe 798818 or 798819. The letter C is the return code, 12 in decimal which is fatal. 3.
Convert it to hexadecimal - 000C 3030 2. http://downloadmunkey.net/xml-parse/xml-parse-error-in-php.php