Your COBOL system supports a subset of the exception codes that are available via the XML-CODE special register. If one of these exceptions occurs, control is passed to the statement in the ON EXCEPTION phrase, or to the end of the XML PARSE or XML GENERATE statement if you did not code an ON EXCEPTION.
The following exception codes are dependent on the XMLPARSE(COMPAT) compiler directive being in effect when using XML PARSE.
Code | Description |
---|---|
1 | The parser found an invalid character while scanning white space outside element content. |
2 | The parser found an invalid start of a processing instruction, element, comment or document type declaration outside element content. |
3 | The parser found a duplicate attribute name. |
4 | The parser found the markup character '<' in an attribute value. |
5 | The start and end tag names of an element did not match. |
6 | The parser found an invalid character in element content. |
8 | The parser found in element content the CDATA closing character sequence '' without the matching opening character sequence ''. |
9 | The parser found an invalid character in a comment. |
10 | The parser found in a comment the character sequence '--' (dashdash) not followed by '>'. |
11 | The parser found an invalid character in a processing instruction data segment. |
12 | A processing instruction target name was 'xml' in lower-case, upper-case or mixed-case. |
13 | The parser found an invalid digit in a hexadecimal character reference (of the form �). |
14 | The parser found an invalid digit in a decimal character reference (of the form &#dddd;). |
15 | The encoding declaration value in the XML declaration did not begin with lower- or upper-case A through Z |
16 | A character reference did not refer to a legal XML character. |
17 | The parser found an invalid character in an entity reference name. |
18 | The parser found an invalid character in an attribute value. |
100 | The parser reached the end of the document while scanning the start of the XML declaration. |
101 | The parser reached the end of the document while looking for the end of the XML declaration. |
102 | The parser reached the end of the document while looking for the root element. |
103 | The parser reached the end of the document while looking for the version information in the XML declaration. |
104 | The parser reached the end of the document while looking for the version information value in the XML declaration. |
106 | The parser reached the end of the document while looking for the encoding declaration value in the XML declaration. |
108 | The parser reached the end of the document while looking for the standalone declaration value in the XML declaration. |
109 | The parser reached the end of the document while scanning an attribute name. |
110 | The parser reached the end of the document while scanning an attribute value. |
111 | The parser reached the end of the document while scanning a character reference or entity reference in an attribute value. |
112 | The parser reached the end of the document while scanning an empty element tag. |
113 | The parser reached the end of the document while scanning the root element name. |
114 | The parser reached the end of the document while scanning an element name. |
115 | The parser reached the end of the document while scanning character data in element content. |
116 | The parser reached the end of the document while scanning a processing instruction in element content. |
117 | The parser reached the end of the document while scanning a comment or CDATA section in element content. |
118 | The parser reached the end of the document while scanning a comment in element content. |
119 | The parser reached the end of the document while scanning a CDATA section in element content. |
120 | The parser reached the end of the document while scanning a character reference or entity reference in element content. |
122 | The parser found a possible invalid start of a document type declaration. |
123 | The parser found a second document type declaration. |
124 | The first character of the root element name was not a letter, '_' or ':'. |
125 | The first character of the first attribute name of an element was not a letter, '_' or ':'. |
126 | The parser found an invalid character either in or following an element name. |
127 | The parser found a character other than '=' following an attribute name. |
128 | The parser found an invalid attribute value delimiter. |
130 | The first character of an attribute name was not a letter, '_' or ':'. |
131 | The parser found an invalid character either in or following an attribute name. |
132 | An empty element tag was not terminated by a '>' following the '/'. |
133 | The first character of an element end tag name was not a letter, '_' or ':'. |
134 | An element end tag name was not terminated by a '>'. |
135 | The first character of an element name was not a letter, '_' or ':'. |
138 | The first character of a processing instruction target name was not a letter, '_' or ':'. |
139 | The parser found an invalid character in or following a processing instruction target name. |
140 | A processing instruction was not terminated by the closing character sequence '?>'. |
141 | The parser found an invalid character following '&' in a character reference or entity reference. |
142 | The version information was not present in the XML declaration. |
143 | 'version' in the XML declaration was not followed by a '='. |
144 | The version declaration value in the XML declaration is either missing or improperly delimited. |
145 | The version information value in the XML declaration specified a bad character, or the start and end delimiters did not match. |
146 | The parser found an invalid character following the version information value closing delimiter in the XML declaration. |
147 | The parser found an invalid attribute instead of the optional encoding declaration in the XML declaration. |
148 | 'encoding' in the XML declaration was not followed by a '='. |
149 | The encoding declaration value in the XML declaration is either missing or improperly delimited. |
150 | The encoding declaration value in the XML declaration specified a bad character, or the start and end delimiters did not match. |
151 | The parser found an invalid character following the encoding declaration value closing delimiter in the XML declaration. |
152 | The parser found an invalid attribute instead of the optional standalone declaration in the XML declaration. |
153 | 'standalone' in the XML declaration was not followed by a '='. |
154 | The standalone declaration value in the XML declaration is either missing or improperly delimited. |
155 | The standalone declaration value was neither 'yes' nor 'no' only. |
156 | The standalone declaration value in the XML declaration specified a bad character, or the start and end delimiters did not match. |
157 | The parser found an invalid character following the standalone declaration value closing delimiter in the XML declaration. |
158 | The XML declaration was not terminated by the proper character sequence '?>', or contained an invalid attribute. |
159 | The parser found the start of a document type declaration after the end of the root element. |
160 | The parser found the start of an element after the end of the root element. |
201 | Miscellaneous XML document parsing errors. |
300 | The document was encoded in EBCDIC, but the CODEPAGE compiler option specified a supported ASCII code page. |
306 | The document was encoded in ASCII, but the CODEPAGE compiler option specified a supported EBCDIC code page. |
310 | The CODEPAGE compiler option specified a supported EBCDIC code page, but the document was encoded in Unicode. |
The following exception codes are dependent on the XMLPARSE(XMLSS) compiler directive being in effect when using XML PARSE.
The exception code is formed from the return code and the reason code that the parser generates. The return code and the reason code are each a halfword binary value. The value in XML-CODE is a concatenation of these two values: the return code in the high-order halfword, and the reason code in the low-order halfword.
Code | Value | Description |
---|---|---|
0000 | XRC_SUCCESS | XMLPARSE processing was successful. |
000C | XRC_NOT_WELL_FORMED | The document is not well-formed. |
0010 | XRC_FATAL | Processing failed. Returned data areas or output parameters cannot be relied on to contain valid data. |
0018 | XRC_NOT_VALID | The document is not valid according to the specified schema. |
Code | Value | Description |
---|---|---|
0000 | XRSN_SUCCESS | The XMLPARSE processing was successful. |
1154 | XRSN_UNKNOWN_ERROR | An unknown abend occurred. |
1203 | XRSN_PARM_UNSUPPORT_ENCODING | XML encoding string is not supported. |
1502 | XRSN_NO_SCHEMAS_SPECIFIED | Either the schema vector parameter passed was NULL, or the number of schemas specified in the vector was zero. |
2000 | XRSN_COMMENT_INCOMPLETE | The document ended within comment markup. |
3000 | XRSN_ATTR_DUPLICATE | Duplicate attributes were found. |
3002 | XRSN_NS_ATTR_PREFIX_NOT_DECL | Namespace prefix on attribute not declared. |
3007 | XRSN_COMMENT_DASH_MISSING | Comment without starting dash found. |
3008 | XRSN_COMMENT_CHAR_INVALID | Comment markup contains incorrect character. |
3009 | XRSN_COMMENT_RIGHT_ANGLE_MISSING | Comment is missing the ending angle bracket at the end of the markup. |
3010 | XRSN_CDATA_KEYWORD_INVALID | CDATA keyword expected but not found. |
3011 | XRSN_CDATA_LEFT_BRACKET_MISSING | Left square bracket expected in CDATA markup. |
3013 | XRSN_CDATA_CHAR_INVALID | A character was found that is not allowed within a CDATA section. |
3017 | XRSN_PI_CHAR_INVALID | A character was found that is not allowed within a Processing instruction. |
3018 | XRSN_ATTR_NAME_CHAR_INVALID | A character was found that is not allowed within an attribute name. |
3020 | XRSN_ATTR_EQUAL_MISSING | An incorrect character was found after the attribute name, and the only character allowed is "=". |
3021 | XRSN_ATTR_QUOTE_MISSING | An incorrect character was found after the attribute "=" character, and he only characters allowed here is either white space, or a single or double quote. |
3022 | XRSN_ATTR_VALUE_CHAR_INVALID | An incorrect character was found in an attribute value. |
3030 | XRSN_CONTNT_CHAR_INVALID | An incorrect character is found in element content |
3031 | XRSN_TAG_ELEMNAME_INVALID | An incorrect character is found in an element tag name. |
3034 | XRSN_TAG_EMPTY_INVALID | An incorrect character is found after the "/" character to end the element tag. The only character allowed is a greater than symbol to end the empty element tag. |
3035 | XRSN_ENDTAG_NAME_MISMATCH | At the element end tag, a mis-match element name is found compared o the name of the start element |
3036 | XRSN_ENDTAG_EMPTY_TAG_INVALID | An incorrect character is found in the element end tag after the element name. The only characters allowed after the name is white pace or the greater than symbol. |
3046 | XRSN_XML_VER_VALUE_INVALID | An incorrect XML version number was specified. The only allowed values are "1.0" or "1.1". |
3050 | XRSN_XML_CHAR_INVALID | In the XML Declaration after the close of the version value, an incorrect character is detected. |
3055 | XRSN_XML_ENC_CHAR_INVALID | An incorrect character is detected in the XML Declaration encoding value. |
3057 | XRSN_XML_STD_VALUE_INVALID | An incorrect value for standalone was specified. The only allowed values are "yes" or "no". |
3060 | XRSN_XML_END_CHAR_INVALID | An incorrect character is detected at the end of the XML declaration, where "?>" is expected. |
3061 | XRSN_ENTITY_NOT_DEFINED | Entity not defined or not defined correctly. |
3062 | XRSN_CHAR_INVALID | An incorrect character was detected in the document. Either white pace or "<" was expected. |
3067 | XRSN_NS_URI_EMPTY | A non-default namespace declaration contains a URI value of zero length and the XML version is 1.0. |
3068 | XRSN_INVALID_CHAR_SEQ | An invalid character sequence ]]> found in the content portion of the document. |
3069 | XRSN_ENTITY_MARKUP_INCOMPLETE | Incomplete markup in entity. |
8406 | XRSN_DEM_CDSECTUNTERMINATED | The CDATA section must end with ]]>. |
8410 | XRSN_DEM_VERSIONINFOREQD | The version is required in the XML declaration. |
8415 | XRSN_DEM_ELEMUNTERMINATED | The element must be followed by either attribute specifications, > or />. |
8429 | XRSN_DEM_COMMENTUNTERM | The comment must end with a comment ending sequence. |
8432 | XRSN_DEM_PIUNTERMINATED | The processing instruction must end with ?>. |
8433 | XRSN_DEM_RESERVEDPITARGET | The processing instruction target matching [xX][mM][lL] is not allowed. |
8435 | XRSN_DEM_DIGREQDINCHARREF | A decimal representation must immediately follow the &# in the character reference. |
8437 | XRSN_DEM_SEMICOLONREQDINCHARREF | The character reference must end with a semicolon delimiter. |
8438 | XRSN_DEM_INVCHARREF | The character reference contains an invalid character. |
8601 | XRSN_VME_INVATTVALUEFORFIXED | The attribute value is not valid with respect to its fixed value constraint. |
8603 | XRSN_VME_NONWSCHARINELEMONLYCONT | The element cannot have non-white space character data because the type's content type is element-only. |
8604 | XRSN_VME_EXPELEMNOMATCH | An expected element match was not found. |
8605 | XRSN_VME_REQDELEMMISSING | The required element or one of its substitutions is required. |
8612 | XRSN_VME_UNDECLATT | The attribute found is not allowed to appear in the element. |
8613 | XRSN_VME_REQDATTMISSING | The attribute must appear on the element. |
8619 | XRSN_VME_XSITVALDOESNOTEXIST | The value cannot be resolved to a type definition for the element. |
8622 | XRSN_VME_FIXEDVCFAILURE | The value does not match the fixed value constraint value for the element. |
Code | Description |
---|---|
400 | The receiver was too small to contain the generated XML document. The COUNT IN data item, if specified, contains the count of character positions that were actually generated. |