ccsid (default best)

The ccsid option specifies the CCSID to be used for processing the XML document. Some CCSID conversions may be performed during the XML-INTO operation: If the CCSID of the actual document is different from the CCSID to be used for processing the document, CCSID conversion will be done on the entire document before parsing begins. If the CCSID to be used for processing the document is different from the CCSID of an RPG variable, CCSID conversion will be done on the data when it is assigned to the RPG variable.

When the XML document is in a file, the contents of the entire file may be converted to another CCSID before parsing begins.

The following table lists several files and their CCSIDs:
File File CCSID Related EBCDIC CCSID
file1.xml 37 37
file2.xml 1252 37
file3.xml 874 838
file4.xml 13488 (N/A, UCS-2)
file5.xml 1208 (N/A, UTF-8)

The following table shows the CCSID that would be used for processing these files for each value of the ccsid option, assuming the job CCSID is 37. An asterisk indicates that the file is converted to a different CCSID before processing:

File CCSID Option Value
best job ucs2
file1.xml 37 37 13488*
file2.xml 37* 37* 13488*
file3.xml 13488* 37* 13488*
file4.xml 13488 37* 13488
file5.xml 13488* 37* 13488*

When the XML document is in a variable, the entire document may be converted to a different CCSID before parsing begins.

Given the following variable definitions:
       D chrXml          S            100A
       D ucs2Xml         S            100C
The following table shows the CCSID that would be used for processing these variables for each value of the "ccsid" option, assuming the job CCSID is 37. An asterisk indicates that the data in the variable is converted to a different CCSID before processing.
Variable CCSID Option Value
best job ucs2
chrXml 37 37 13488
ucs2Xml 13488 37* 13488