Data encoding

Most operating systems, such as AIX® and Linux, use ASCII character encoding. Most IBM® i functions use EBCDIC character encoding.

You can specify a coded character set identifier (CCSID) value for some IBM i object types to identify a specific encoding for character data in the object.

PASE for i byte stream files have a CCSID attribute that is used by most system interfaces outside PASE for i to convert text data read from or written to the file as needed. IBM i does not do CCSID conversion for data read from or written to stream files (consistent with AIX), but it does set the CCSID attribute of any byte stream file created by an PASE for i program to the current PASE for i CCSID value so other system functions can correctly handle ASCII text in the file.

If you use AIX APIs that are shipped in the PASE for i shared libraries, PASE for i handles most of the data conversion for you. PASE for i programs can use iconv functions provided in shared library libiconv.a for any character data conversions that are not handled automatically by PASE for i run time. For example, an PASE for i application generally needs to convert character strings to EBCDIC before calling an IBM i API function (using either _ILECALLX or _PGMCALL).