Language compilers CCSID
Some language compilers expect syntactical operators and the naming convention for the source code to be in CCSID 00037.
You can refer to the documentation for the language compiler you use.
For these compilers, incorrect mapping occurs if the source is compiled with a CCSID other than 00037 or 65535. You must ensure that these compilers receive any variant characters used in language syntax in CCSID 00037.
ILE language compilers
When an ILE C, ILE RPG, or ILE COBOL program is compiled, source from database source files is converted to the CCSID of the primary source file.
Compilers for these languages can handle syntactical operators in most CCSIDs. These compilers can also handle naming conventions for the source code in most CCSIDs.
Non-ILE language compilers
When a non-ILE CL, non-ILE RPG, or non-ILE COBOL program is compiled, source from database source files is converted to the CCSID of the job.
If you do not want your names, constants, or literals converted to the CCSID of the job, you can change your job CCSID to 65535. Your constants, literals and names then remain intact.
Example 1
The following example shows a sample non-ILE RPG program. This example shows English source on a system in the United States.
* RPG Source (Source file created using CCSID 00037 but tagged
* with CCSID 65535)
FFILE1 IF E DISK 80
C READ FILE1
C* Test char
C*
C FLD1 IFEQ '$'
C ...
C* Move char
C*
C MOVE FLD1 FLD$
C ...
C*
C SETON LRExample 2
In Finland, the program in the first example does not compile because the field name FLD$ contains a variant character (the dollar sign). The variant character represents a different code point in a code page other than 00037. This figure shows the same sample non-ILE RPG program as English (U.S.) source on a system in Finland (CCSID 278).
* RPG Source (Source file created with CCSID 00037, but tagged
* with 65535)
FFILE1 IF E DISK 80
C READ FILE1
C* Test char
C*C FLD1 IFEQ '
'
C ...
C* Move char
C*C MOVE FLD1 FLD
C ...
C*
C SETON LRExample 3
You can correct this error by changing the file CCSID to 00037 and setting the job CCSID to 00278 (for Finland). The following example shows the changed file as seen English source in Finland.
* RPG Source (Source file created using CCSID 00037 and tagged
* with CCSID 00037)
FFILE1 IF E DISK 80
C READ FILE1
C* Test char
C*
C FLD1 IFEQ '$'
C ...
C* Move char
C*
C MOVE FLD1 FLD$
C ...
C*
C SETON LR