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


Concatenating substring notations and character expressions

HLASM Language Reference
SC26-4940-06

Substring notations (see Substring notation) can be concatenated with character expressions in the operand field of a SETC instruction. If a substring notation follows a character expression, the two can be concatenated by placing a period between the terminating apostrophe of the character expression and the opening apostrophe of the substring notation.

For example, if &ALPHA has been assigned the character value AB%4, and &BETA has been assigned the character value ABCDEF, the following statement assigns &GAMMA the character value AB%4BCD:
&GAMMA   SETC            '&ALPHA'.'&BETA'(2,3)

If a substring notation precedes a character expression or another substring notation, the two can be concatenated by writing the opening apostrophe of the second item immediately after the closing parenthesis of the substring notation.

Optionally, you can place a period between the closing parenthesis of a substring notation and the opening apostrophe of the next item in the operand field.

If &ALPHA has been assigned the character value AB%4, and &ABC has been assigned the character value 5RS, either of the following statements can be used to assign &WORD the character value AB%45RS.
&WORD    SETC            '&ALPHA'(1,4).'&ABC'
&WORD    SETC            '&ALPHA'(1,4)'&ABC'(1,3)

If a SETC symbol is used in the operand field of a SETA instruction, the character value assigned to the SETC symbol must be 1-to-10 decimal digits (not greater than 2147483647), or a valid self-defining term.

If a SETA symbol is used in the operand field of a SETC statement, the magnitude of the arithmetic value is converted to an unsigned integer with leading zeros removed. If the value is 0, it is converted to a single 0.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014