Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


DBCS literals

The formats and rules for DBCS literals are listed below.

Format for DBCS literals

G“DBCS-characters”
G'DBCS-characters'
N“DBCS-characters”
N'DBCS-characters'
G“, G', N”, or N'
Opening delimiters.

N“ and N' identify a DBCS literal when the NSYMBOL(DBCS) compiler option is in effect. They identify a national literal when the NSYMBOL(NATIONAL) compiler option is in effect, and the rules specified in National literals apply.

or '
The closing delimiter. If a quotation mark is used in the opening delimiter, it must be used as the closing delimiter. Similarly, if an apostrophe is used in the opening delimiter, it must be used as the closing delimiter.
DBCS-characters
Any DBCS character.
Maximum length
The maximum length is limited by the available space on one source line.
Continuation rules
Cannot be continued across lines

DBCS literals with the SOSI compiler option

When the SOSI compiler option is in effect, workstation shift-out (SO) and shift-in (SI) control characters delimit DBCS characters in source text. The following is the syntax for DBCS literals with shift-out and shift-in delimiters:

Format for DBCS literals

G“<DBCS-characters>”
G'<DBCS-characters>'
N“<DBCS-characters>”
N'<DBCS-characters>'
<
Represents the shift-out control character (X'1E')
>
Represents the shift-in control character (X'1F')

Rules for DBCS characters, literal delimiters, maximum length, and continuation are the same as for DBCS literals without the SOSI compiler option. See the COBOL for Windows Programming Guide for the details of the SOSI compiler option.

Where DBCS literals can be used

DBCS literals can be used in the following places:


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)