One of several exception codes might be returned in the XML-CODE special register during XML generation. 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.
| Exception code (decimal) | 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 multibyte data-name contained a character that, when converted to Unicode, was not valid in an XML element or attribute name. |
| 402 | The first character of a multibyte data-name, when converted to Unicode, was not valid as the first character of an XML element or attribute name. |
| 403 | The value of an OCCURS DEPENDING ON variable exceeded 16,777,215. |
| 410 | The encoding specified for the XML document is not supported for conversion to Unicode. |
| 411 | The receiver was host alphanumeric, but the encoding specified for the document is not a supported single-byte EBCDIC code page. |
| 412 | The receiver was native alphanumeric, but the encoding specified for the document was not UTF-8 or a supported single-byte ASCII code page. |
| 413 | The receiver was alphanumeric, but the runtime locale was not consistent with the compile-time locale. |
| 414 | The encoding specified for the XML document was invalid or was not a supported code page. |
| 415 | The receiver was national, but the encoding specified for the document was not UTF-16. |
| 416 | The XML namespace identifier contained invalid XML characters. |
| 417 | Element character content or an attribute value contained characters that are illegal in XML content. XML generation has continued, with the element tag name or the attribute name prefixed with 'hex.' and the original data value represented in the document in hexadecimal. |
| 418 | Substitution characters were generated by encoding conversion. |
| 419 | The XML namespace prefix was invalid. |
| 420 | The source data item included a multibyte name or multibyte content, and the receiver was native alphanumeric, but the encoding specified for the document was not UTF-8. |
| 600-699 | Internal error. Report the error to your service representative. |
related tasks
Handling XML GENERATE exceptions
related references
XML generation