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


Graphic constant—G

HLASM Language Reference
SC26-4940-06

When the DBCS assembler option is specified, the graphic (G-type) constant is supported. This constant type allows the assembly of pure double-byte data. The graphic constant differs from a character constant containing only double-byte data in that the SO and SI delimiting the start and end of double-byte data are not present in the assembled value of the graphic constant. Because SO and SI are not assembled, if a duplication factor is used, no redundant SI/SO characters are created. For example, the statement:
DBCS     DC              3G'<D1>'
results in the assembled character string value of:
D1D1D1
Examples of graphic constants are:
DBCS1    DC              G'<.A.B.C>'
DBCS2    DC              GL10'<.A.B.C>'
DBCS3    DC              GL4'<.A.B.C>'

Because the length attribute does not include the SO and SI, the length attribute of DBCS1 is 6. The length modifier of 10 for DBCS2 causes padding of 2 double-byte spaces at the right of the nominal value. The length modifier of 4 for DBCS3 causes truncation after the first 2 double-byte characters. The length attribute of a graphic constant must be a multiple of 2.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014