HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Double-byte data in character constants

HLASM Language Reference
SC26-4940-06

When the DBCS assembler option is specified, double-byte data can be used in a character constant. The start of double-byte data is delimited by SO, and the end by SI. All characters between SO and SI must be valid double-byte characters. No single-byte meaning is drawn from the double-byte data. Hence, special characters such as the apostrophe and ampersand are not recognized between SO and SI. The SO and SI are included in the assembled representation of a character constant containing double-byte data.

If a duplication factor is used, SI/SO pairs at the duplication points are not removed. For example, the statement:
DBCS     DC              3C'<D1>'
results in the assembled character string value of:
<D1><D1><D1>

Null double-byte data (SO followed immediately by SI) is acceptable and is assembled into the constant value.

The following examples of character constants contain double-byte data:
DBCS0    DC              C'<>'
DBCS1    DC              C'<.D.B.C.S>'
DBCS2    DC              C'abc<.A.B.C>'
DBCS3    DC              C'abc<.A.B.C>def'

The length attribute includes the SO and SI. For example, the length attribute of DBCS0 is 2, and the length attribute of DBCS2 is 11. No truncation of double-byte character strings within C-type constants is allowed, since incorrect double-byte data is created.

It is possible to generate invalid DBCS data in these situations:
  • You specify a bit-length modifier that causes truncation of the DBCS data or the shift-out and shift-in characters.
  • You specify the TRANSLATE option.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014