If you do not have the IBM web site link for the XL C/C++ library bookmarked in your browser, I
strongly suggest you do so -- NOW!. It is obvious that you need to spend several days reading the manuals in this library to understand the differences between z/OS C/C++ and whatever variant you are used to using. From the XL C/C++ Run-Time Library Reference manual, section 3.408 on iconv:
If a sequence of input bytes does not form a valid character in the specified encoded character set, conversion stops after the previous successfully converted character, and iconv() sets errno to EILSEQ. If the input buffer ends with an incomplete character or shift sequence, conversion stops after the previous successfully converted bytes, and iconv() sets errno to EINVAL. If the output buffer is not large enough to hold the entire converted input, conversion stops just before the input bytes that would cause the output buffer to overflow.
For just one example, you mentioned //TRANSLIT in your earlier post. There is not a single reference to TRANSLIT in either the XL C/C++ or Unix System Services bookshelves -- which is a pretty good sign that there's no such thing on the mainframe (at least in Unix System Services). The double forward slash is used for other purposes on the mainframe, so it would be extremely rare to see those characters used for a flag.