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>' |
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.
The opening delimiter must be followed immediately by a shift-out control character.
For literals with opening delimiter N" or N', when embedded quotes or apostrophes are specified as part of DBCS characters in a DBCS literal, a single embedded DBCS quote or apostrophe is represented by two DBCS quotes or apostrophes. If a single embedded DBCS quote or apostrophe is found, an E-level compiler message will be issued and a second embedded DBCS quote or apostrophe will be assumed.
The closing delimiter must appear immediately after the shift-in control character.
DBCS literals can be used in the following places: