XML PARSE exceptions with XMLPARSE(XMLSS) in effect
When the z/OS® XML System Services parser passes
control to your processing procedure for an exception event, the XML-CODE
special
register contains the exception code, which is formed from a return
code and a reason code.
The return code and reason code are each a halfword binary value. The exception code is the concatenation of those two values: the return code in the high-order halfword, and the reason code in the low-order halfword.
The return codes and reason codes are documented as hexadecimal values in the z/OS XML System Services User's Guide and Reference, referenced below, and in Table 1 below.
After most exception events,
the parser does not continue processing; the value in XML-CODE
at
the end of the XML PARSE
statement is the original
exception code set by the parser.
When
the processing procedure returns to the parser after the exception
event, control transfers to the statement specified in the ON
EXCEPTION
phrase, or to the end of the XML PARSE
statement
if you did not code an ON EXCEPTION
phrase.
Validation exceptions:
If you code an XML
PARSE
statement that contains the VALIDATING
phrase,
and the z/OS XML System Services
parser determines that the document is not valid, the parser generates
return code 24 (hexadecimal 18, XRC_NOT_VALID
).
Exceptions that are unique to Enterprise COBOL:
Some exceptions
are unique to Enterprise COBOL and thus
are not documented in the z/OS XML System Services User's Guide and Reference, for example,
errors that occur during XML schema retrieval. The return
code for exceptions with reason codes in the hexadecimal range 800
to 899 is 4 (hexadecimal 0004, XRC_WARNING
). For
other exceptions, the return code is 16 (hexadecimal 0010, XRC_FATAL
).
The exception code (the value in special register XML-CODE
),
is formed from this return code concatenated with one of the reason
codes shown in the following table.
Reason code (hexadecimal) | Description |
---|---|
700 | VALIDATING WITH FILE is not supported under CICS®. |
701 | The optimized XML schema that was read in was too short, or the file was empty. |
702 | The file identifier for the schema was not a ddname or environment-variable name. |
703 | The DSN value contained a space character in a position where a space is not allowed. |
704 | The DSN value specified a temporary data set. |
705 | The PATH value contained an unescaped space character. |
706 | The PATH value contained a path name that was not an absolute path. |
707 | Memory allocation for the XML schema buffer failed. |
708 | The environment variable was null or contained only spaces. |
709 | The environment variable contained an invalid keyword. |
710 | The DSN value contained an invalid character after the member name. |
711 | The DSN value did not specify a member name. |
712 | The DSN value did not specify a data set name, or parentheses were not specified correctly. |
713 | The PATH value did not specify a path name, or parentheses were not specified correctly. |
714 | The DSN value contained an extra parenthesis. |
715 | The PATH value contained an extra parenthesis. |
716 | The DSN value was missing the closing parenthesis. |
717 | The PATH value was missing the closing parenthesis. |
718 | The DSN value contained an escape character. |
720 | A character reference for an unrepresentable character was not resolved. |
721 | An unrepresentable character reference in the document type declaration is not supported. |
800 | The attribute name used an undeclared prefix. |
801 | The START-OF-ELEMENT name used
an undeclared prefix. (The END-OF-ELEMENT name must
match, so using the same undeclared prefix does not cause another
exception.) |
900 | Internal error. Report the error to your service representative. |
For any of the reason codes except 900, correct the error and then retry your program.
XMLPARSE (compiler option)
XML PARSE statement (Enterprise COBOL for z/OS Language Reference)
z/OS XML System Services User's Guide and Reference