Code conversion functions

The iconv_open(), iconv(), and iconv_close() library functions can be called from C or C++ source to initialize and perform the characters conversions from one character set encoding to another.

The iconv() family of functions has been modified to utilize character conversion services provided by Unicode Services. The iconv_open(), iconv(), and iconv_close() function interfaces remain unchanged except for the addition of the following: For more information about these errno values and environment variables, see the iconv_open() function description in z/OS XL C/C++ Runtime Library Reference.
There are differences in externals between the iconv() family of functions and Unicode Services. However, the differences in externals are managed by the iconv() family of functions except where noted in the C/C++ Migration Guide for Application Developers. All conversions listed in Table 2 and Table 1 will continue to work as they do today. However, Unicode Services supports conversions between thousands of additional character sets not listed inTable 2 and Table 1 . A complete list of conversions supported by Unicode Services can be found in EBCDIC Conversion Table, ASCII Conversion Table, and Unicode Conversion Table in z/OS Unicode Services User's Guide and Reference. To set up a conversion using iconv_open() for any of the character sets listed in EBCDIC Conversion Table, ASCII Conversion Table, and Unicode Conversion Table, use a character string representing the CCSID’s for fromcode/tocode. For example, to set up a conversion from CCSID 00256 to CCSID 00870 using conversion technique R, you need to set the _ICONV_TECHNIQUE environment variable to R and call iconv_open() as follows:
cd = iconv_open(“00870”, “00256”); 
and continue to use iconv() and iconv_close() as in previous releases.