XML generate exceptions

The following table shows the exception codes that can occur during XML generation. The exception codes are returned in special register XML-CODE. If one of these exceptions occurs, control is passed to the statement in the ON EXCEPTION phrase, or to the end of the XML GENERATE statement if you did not code an ON EXCEPTION phrase.

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.
401 A data-name contained a character that, when converted to Unicode, was not valid in an XML element name.
411 The CCSID specified by PROCESS statement CCSID option d is not a supported single-byte CCSID.
450 The XML file already exists.
451 The existing XML file has incorrect CCSID.
600…699 Internal error. Please report the error to your service representative.
650 Internal error. OPEN, WRITE, CLOSE, or REPLACE of the stream file failed. Please report the error to your service representative.
3000…3600 Internal error with the stream file. Please report the error to your service representative.

related tasks Handling errors in generating XML output