Double-byte character set

In addition to the standard EBCDIC set of characters, High Level Assembler accepts double-byte character set (DBCS) data. The double-byte character set consists of the following:

Table 1. Double-byte character set (DBCS)
Character or code Description
Double-byte space X'4040'
Double-byte characters Each double-byte character contains 2 bytes, each of which must be in the range X'41' to X'FE'. The first byte of a double-byte character is known as the ward byte. For example, the ward byte for the double-byte representation of EBCDIC characters is X'42'.
Shift codes

Shift-out (SO) - X'0E'
Shift-in (SI) - X'0F'

Note:
  1. SO and SI delimit DBCS data only when the DBCS assembler option is specified. The DBCS assembler option is described in the section "DBCS" in the HLASM Programmer's Guide.
  2. When the DBCS assembler option is specified, double-byte characters can be used anywhere that EBCDIC characters enclosed by apostrophes can be used.
  3. Regardless of the invocation option, double-byte characters can be used in remarks, comments, and the statements processed by AREAD and REPRO statements.

Examples showing the use of EBCDIC characters and double-byte characters are given in Table 2. For a description of the DBCS notation used in the examples, see Double-byte character set notation.

Table 2. Examples using character set
Characters Usage Example Constituting
Alphanumeric In ordinary symbols
Label
FIELD#01
Save_Total
&EASY_TO_READ
Terms
  In variable symbols
&EASY_TO_READ
 
Digits

As decimal
self-defining
terms

1
9
Terms

Special
Characters

 
As operators

   

    +

Addition
NINE+FIVE
Expressions

    -

Subtraction
NINE-5
Expressions

    *

Multiplication
9*FIVE
Expressions

    /

Division
TEN/3
Expressions

  + or -

(Unary)
+NINE    -FIVE
Terms¹
  As delimiters    
Spaces Between fields LABEL AR 3,4 Statement
Comma Between operands OPND1,OPND2 Operand field
Apostrophes Enclosing character strings 'STRING' String
  Attribute operator L'OPND1 Term
Parentheses Enclosing subfields or subexpressions MOVE MVC TO(80),FROM(A+B*(C-D)) Statement expression
SO and SI Enclosing double-byte data
C'<.A.B.C>abc'
G'<D1D2D3D4>'

Mixed string
Pure DBCS

  As indicators for  
Ampersand Variable symbol &VAR Term
Period Symbol qualifier QUAL.SYMBOL Term
  Sequence symbol .SEQ (label)
  Comment statement in macro definition .*THIS IS A COMMENT Statement
  Concatenation &VAR.A Term
  Bit-length specification DC CL.7'AB' Operand
  Decimal point DC F'1.7E4' Operand
Asterisk Location counter reference *+72 Expression
  Comment statement *THIS IS A COMMENT Operand
Equal sign Literal reference L 6,=F'2' Operand
  Keyword &KEY=D Keyword parameter
Note:
  1. If these are passed as macro arguments, they are treated as expressions, not terms. Expressions cannot be substituted into SETA expressions.