The SQL precompiler accepts source that is UTF-8 (CCSID 1208).
Source file CCSIDs in the SQL precompiler
For a UTF-8 source stream file (CCSID 1208), the SQL precompiler uses the CCSID provided by the Conversion CCSID (CVTCCSID) parameter on the precompile command. The CVTCCSID parameter must identify a valid single-byte or mixed-byte EBCDIC CCSID. The SQL precompiler converts the UTF-8 source to the CVTCCSID and then considers the CCSID of the primary source to be the CVTCCSID value instead of UTF-8.
When processing SQL INCLUDE statements, the include source is converted to the CCSID of the primary source if necessary. If the include source cannot be converted to the CCSID of the primary source, an error occurs.
The SQL precompiler processes SQL statements using the source CCSID. This affects variant characters the most. For example, the not sign (¬) is located at 'BA'X in CCSID 500. This means that if the CCSID of your source file is 500, SQL expects the not sign (¬) to be located at 'BA'X.
If the source file CCSID is 65535, SQL processes variant characters as if they had a CCSID of 37. This means that SQL looks for the not sign (¬) at '5F'X.
Was this topic helpful?
13 January 2020