Previous Topic: Figurative ConstantsNext Topic: Multibit Binary Constants


Graphic Literals

Purpose

A graphic literal, also known as a G-literal, is a special type of double-byte character set (DBCS) string used when working with non-EBCDIC alphabets, such as the Japanese Kanji alphabet, the Korean Han-gul alphabet, or Chinese characters.

Usage

The graphic literal allows DBCS characters to be moved or compared to database or map record elements when shift codes are not part of the actual data.

This type of constant starts with the EBCDIC character G, followed by a single quotation character, a shiftout [SO], one or more DBCS characters, a shiftin [SI], and a closing single quotation character:

G'[SO]DBCS-characters[SI]'

The number of characters expressed depends on the hardware supporting DBCS. Maximum size is 255 bytes.

Note: For more information about defining data to handle DBCS characters in the data dictionary, see the CA IDMS IDD Quick Reference Guide. For more information about defining maps that handle DBCS characters, see the CA IDMS Mapping Facility Guide.

Example

An example of a graphic literal used in a process command is shown below:

IF MAP-REC-DBCS EQ G'[SO]DBCS-characters[SI]'
  THEN
    RETURN.