ILE COBOL Programmer's Guide

How to Specify Literals Containing DBCS Characters

When you specify any literal that contains DBCS characters, follow the same rules that apply in specifying alphanumeric literals, as well as the following rules specific to mixed and DBCS literals:

The shift-out and shift-in characters cannot be nested.

The shift control characters are part of a mixed literal (not a pure DBCS literal), and take part in all operations.

Other Considerations

Other considerations include:

Quotation Marks

Although the preceding discussion uses the term a quotation mark to describe the character that identifies a literal, the character actually used can vary depending upon the option specified on the CRTCBLMOD or CRTBNDCBL commands, or on the PROCESS statement. If you specify the APOST option, an apostrophe (') is used. Otherwise, a quotation mark (") is used. In this appendix, a quotation mark refers to both an apostrophe and a quotation mark. The character that you choose does not affect the rules for specifying a literal.

Shift Characters

The shift-out and shift-in characters separate EBCDIC characters from DBCS characters. They are part of the mixed literal. Therefore, the shift code characters participate in all operations when they appear in mixed literals. Shift code characters do not participate in any operations when they appear in DBCS literals.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]