16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

chcp<br />

Examples<br />

Usage notes<br />

You get the following output:<br />

Current ASCII code page = ISO8859-1<br />

Current EBCDIC code page = IBM-1047<br />

1. To set the ASCII and EBCDIC code pages to IBM-eucJP and IBM-939, enter:<br />

chcp –a IBM-eucJP –e IBM-939<br />

2. To change just the EBCDIC code page to IBM-277, enter:<br />

chcp –seIBM-277<br />

3. To change just the ASCII code page to IBM-850, enter:<br />

chcp –a IBM-850<br />

4. To reset ASCII/EBCDIC code page conversion to the default code pages for this<br />

terminal, enter:<br />

chcp –r<br />

5. To query the current ASCII and EBCDIC code pages for this terminal, enter:<br />

chcp –q<br />

1. Do not use chcp when you are logged on from the TSO/E OMVS command<br />

because the OMVS command does not do any ASCII/EBCDIC code page<br />

conversion.<br />

Shell scripts can test _BPX_TERMPATH environment variable and bypass chcp<br />

when the user is logged on through OMVS. (The _BPX_TERMPATH<br />

environment variable enables shell scripts to tell if the user logged on from<br />

TSO/E rather than from rlogin or telnet.)<br />

Before starting the session, the TSO/E OMVS command sets<br />

_BPX_TERMPATH to “OMVS”.<br />

Sample shell script code:<br />

# -----------------------------------------------<br />

# Issue chcp only if not using TSO/E OMVS command<br />

# -----------------------------------------------<br />

if<br />

test "$_BPX_TERMPATH" != "OMVS"<br />

then<br />

chcp –a IBM-850 –e IBM-1047<br />

fi<br />

2. After running chcp –s to change the EBCDIC code page for the session, you<br />

may also need to alter or set the following environment variables to match the<br />

new code page:<br />

v LANG<br />

v LC_ALL<br />

v LC_COLLATE<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v LC_SYNTAX<br />

v NLSPATH<br />

3. The code page names supplied with the –a and –e options are passed to<br />

iconv_open() without any uppercase or lowercase conversion. Code page<br />

converters that convert between the specified ASCII and EBCDIC code pages<br />

must be available for iconv().<br />

4. If ASCII/EBCDIC conversion is not active for this terminal, both the ASCII and<br />

EBCDIC code pages must be specified on the chcp –s command. At other<br />

120 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!