To handle the exception event in your processing procedure, do these steps:
If no unhandled exceptions occur before the end of parsing, control is passed to the statement that you specify on the NOT ON EXCEPTION phrase (normal end of parse). If you do not code a NOT ON EXCEPTION phrase, control is passed to the end of the XML PARSE statement. The special register XML-CODE contains zero.
You can handle exceptions in this way only if the exception code passed in XML-CODE is within one of the following ranges:
Otherwise, the parser signals no further events, and passes control to the statement that you specify on your ON EXCEPTION phrase. In this case, XML-CODE contains the original exception number, even if you set XML-CODE to zero in your processing procedure before returning control to the parser.
If you return control to the parser with XML-CODE set to a nonzero value different from the original exception code, the results are undefined.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.