Specifying the text conversion

Start of changeSome commands that perform file input/output and, by default, allow automatic conversion of tagged files, allow the automatic code set conversion of files that are tagged as text with a code set have the option of specifying the text conversion. These commands use the filecodeset and pgmcodeset option (-W option to specify the text conversion. The explicit use of the filecodeset or pgmcodeset option (-W option on the command will override any automatic conversion, any use of the –B option to disable automatic conversion, as well as any text conversion indicated by the _TEXT_CONV environment variableEnd of change

The filecodeset and pgmcodeset option (-W option) applies to the input text file that is processed by the command. Other files that are used by the command, such as a file list or configuration information, are not affected by the filecodeset and pgmcodeset option (-W option). When a command allows the use of the standard input (stdin) in place of the input text file, the filecodeset and pgmcodeset option (-W option) will be applied to the standard input (stdin) if it is not associated with a terminal.

The coded character set can be specified by using the code set name or by using the numeric coded character set identifier (CCSID). The command iconv -l lists existing numeric CCSIDs along with their corresponding code set names.

Note: Start of changeBPXK_UNICODE_TECHNIQUE, _BPXK_UNICODE_SUB and _BPXK_UNICODE_MAL specifies the Unicode Services actions to take for the translation operation. For more information about those environment variables, see z/OS UNIX System Services Planning.End of change

Start of changeRestriction: Text conversion can take place between pgmcodeset IBM-1047 and any filecodeset that Unicode Service supports.End of change

Following are commands that can specify text conversion using the filecodeset or pgmcodeset option (-W option).

cat
cmp
comm
cut
diff
dircmp
ed
egrep
ex
expand
fgrep
file
grep
head
more
paste
sed
strings
tail
unexpand
uniq
vi
wc