Under the z/OS Shell
Under z/OS® UNIX System Services, use the iconv command to invoke the iconv utility. The invocation syntax for the iconv command is as follows:
iconv [–sc] –f oldset –t newset [file …]
or
iconv –l [–v]
The iconv utility converts characters in file (or from
stdin if you do not specify a file) from one code page
set to another. It writes the converted text to stdout. See The inconv utility
in z/OS XL C/C++ Programming Guide for
more information about the code sets that are supported for this command.
If the input contains a character that is not valid in the source
code set, iconv replaces it with the byte 0xff and
continues, unless the –c option is specified.
If the input contains a character that is not valid in the destination code set, the behavior
depends on the iconv() function of the system. See z/OS XL C/C++ Runtime Library Reference for more information about the
character that is used for converting incorrect characters.
You can use iconv to convert single-byte data or double-byte data.
Options
- –c
- Characters that contain conversion errors are not written to the
output. By default, characters not in the source character set are
converted to the value
0xffand written to the output. - –f oldset
- oldset can be either the code set name or a pathname to a file that contains an external code set. Specifies the current code set of the input.
- –l
- Lists code sets in the internal table. This option is not supported.
- –s
- Suppresses all error messages about faulty encodings.
- –t newset
- Specifies the destination code set for the output. newset can be either the code set name or a pathname to a file that contains an external code set.
- –v
- Specifies verbose output.