Skip to main content

Problem:

XML document & COBOL -  accepting XML string through linkage - (using COBOL SELECT statement to use buffer area (address using "WSDATA") -  in XML file, between start of document event and end of document, parsing halts with "Exception error 102" message while searching for root element.

Resolution:

XML exception error 102 parsing error is to be expected in this scenario.  The parser reached the end of the document while looking for the root element.

With XML exceptions, no further events are returned from the parser, even if you set XML-CODE to zero and return control to the parser after processing the exception. Control is passed to the statement that you specify on your NOT ON EXCEPTION phrase or to the end of the parse statement if you have not coded a NOT ON EXCEPTION phrase.  Solution:  Include the NOT ON EXCEPTION phrase.

Old KB# 1482