Controlling the encoding of generated XML output

When you generate XML output by using the XML GENERATE statement, you can control the encoding of the output by the category of the data item that receives the XML output. The following table shows the possible output formats.

Table 17. Encoding of generated XML output
If you define the receiving XML identifier as: The generated XML output is encoded in:
Alphanumeric The CCSID specified by the PROCESS statement CCSID option d -- XML GENERATE single-byte data CCSID in effect when the source was compiled. If the CCSID in effect is 65535, the job default CCSID at run time will be used.
National Unicode (UCS-2, CCSID 13488)1
  1. A byte order mark is not generated.

For details about how data items are converted to XML and how the XML element names are formed from the COBOL data-names, see the related reference below about the operation of the XML GENERATE statement.

related references
Operation of XML GENERATE (ILE COBOL Language Reference)