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.

v Environment variables (DBCS characters are not exportable).<br />

v Delimiters such as space, slash (/), braces { }, tab, parentheses, dot (.), and any<br />

other shell special characters.<br />

v Encoding for newline or null cannot be embedded in a DBCS character’s code.<br />

There are other rules that define valid DBCS data:<br />

– The DBCS blank is 0x4040.<br />

– The first byte of the code defining the DBCS character must be in the range<br />

0x41 to 0xFE.<br />

– The second byte must be in the range 0x41 to 0xFE.<br />

All others are invalid. This effectively covers the newline and null escape<br />

sequences, since they cannot be part of a valid DBCS character.<br />

For more information on invalid DBCS characters, see Byte sequences that are<br />

not permitted in DBCS strings.<br />

v Although filenames with DBCS characters are tolerated, you should not create<br />

filenames with DBCS characters. Doing so makes the file nonportable across<br />

locales, and problems may occur if filenames are subsequently used in a<br />

singlebyte locale. Instead, use the P<strong>OS</strong>IX portable filename character set and<br />

singlebyte filenames.<br />

IBM will not support any customer problems with DBCS filenames.<br />

For more information on DBCS filenames, see Problems with filenames<br />

containing DBCS characters.<br />

When you can use DBCS characters<br />

When in the DBCS locale, you can use DBCS to specify the following:<br />

v sh command-line arguments, although arguments expressed as numeric values<br />

must use SBCS characters.<br />

v Text in data files. Files containing DBCS text are processed correctly by the shell<br />

and the utilities (such as ed and grep) if the DBCS locale is active. These files<br />

can be either DBCS text or mixed text (combinations of SBCS and DBCS). Both<br />

types of file can exist in the file system along with files that contain only<br />

singlebyte text.<br />

Byte sequences that are not permitted in DBCS strings<br />

If you create invalid DBCS text, you may see an “illegal byte sequence” message<br />

when processing that text. The shell or command issues this error message, and<br />

the command stops processing in most cases.<br />

Valid DBCS strings must start with “shift out” (SO [0x0E]) and end with “shift in” (SI<br />

[0x0F]). The first byte of the code defining the DBCS character must be in the<br />

range 0x41 to 0xFE. The second byte must be in the range 0x41 to 0xFE. The<br />

exception is that DBCS blank is 0x4040. All others codes are invalid.<br />

Normal terminal operations do not produce invalid DBCS strings. To prevent invalid<br />

DBCS characters and strings:<br />

v Do not use commands that operate on the data as byte strings instead of<br />

character strings. For example, head is a utility that could truncate a DBCS string<br />

or character in an inappropriate place, thus creating an invalid DBCS string.<br />

Using pipes between utilities can also result in invalid DBCS strings unless you<br />

pay attention to how each command handles the data.<br />

v Do not edit text in nontext mode such as having the TSO/E editor with in HEX<br />

ON mode.<br />

8 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!