CCSID conversions for I/O with data structures defined with LIKEREC(*ALL) or EXTNAME(*ALL)
Prior to release IBM® i 7.6, when there was a mismatch between the CCSIDs of the alphanumeric data in the I/O buffers for database files and the subfields of a result data structure, the RPG compiler did not generate code to perform necessary CCSID conversions if the data structure was defined with *ALL.
The mismatch could occur in the following ways:
- The database file is defined with keyword DATA(*NOCVT) and the data structure is not defined with keyword CCSID(*EXACT). In this case, the fields in the I/O buffers have the same CCSID as the fields in the file, but the alphanumeric subfields in the data structure have the job CCSID.
- The database file is defined with DATA(*CVT) and the data structure is defined with keyword CCSID(*EXACT). In this case, the alphanumeric subfields in the I/O buffers have the job CCSID, but the subfields in the data structure have the same CCSID as the fields in the file.
Note that the DATA keyword might have a default set by the OPENOPT(*NOCVTDATA) or OPENOPT(*CVTDATA) keyword.
Starting in the base of release IBM i 7.6 for TGTRLS(*CURRENT), the compiler defaults to performing the necessary CCSID conversions between the data structure and the I/O buffers.
If you have made changes to circumvent the original issue where CCSID conversions were not done, and you want the compiler to omit the necessary CCSID conversions between the data structure and the I/O buffers, add environment variable QIBM_RPG_HANDLE_CCSID_ALL_DS_IO with a value of 'N' when you compile your program.
In IBM i releases 7.2. 7.3, 7.4, 7.5, and 7.6 for target releases other than TGTRLS(*CURRENT), you can add the same environment variable, QIBM_RPG_HANDLE_CCSID_ALL_DS_IO, with a value of 'Y', to cause the compiler to perform the required CCSID conversions between the data structure and the I/O buffers.