22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The following statement assigns the character value HALF&& to the SETC<br />

symbol &AND.<br />

&AND SETC 'HALF&&'<br />

This is the only instance when the assembler does not pair ampersands to<br />

produce a single ampersand. However, if you substitute a SETC symbol with<br />

such a value into the nominal value in a DC instruction operand, or the operand<br />

of an MNOTE instruction, when the assembler processes the DC or MNOTE<br />

instruction, it pairs the ampersands and produces a single ampersand.<br />

3. To generate a period, two periods must be specified after a variable symbol.<br />

For example, if &ALPHA has been assigned the character value AB%4, the<br />

following statement can be used to assign the character value AB%4.RST to the<br />

variable symbol &GAMMA.<br />

&GAMMA SETC '&ALPHA..RST'<br />

4. To generate a period, the variable symbol may have a period as part of its<br />

value. For example:<br />

&DOT SETC '.'<br />

&DELTA SETC 'A&DOT.&DOT' &DELTA has value 'A..'<br />

5. Double-byte data can appear in the character string if the assembler is invoked<br />

with the DBCS option. The double-byte data must be bracketed by the SO and<br />

SI delimiters, and the double-byte data must be valid.<br />

6. The DBCS ampersand and apostrophe are not recognized as delimiters.<br />

7. A double-byte character that contains the value of an EBCDIC ampersand or<br />

apostrophe in either byte is not recognized as a delimiter when enclosed by SO<br />

and SI.<br />

8. Duplication (replication) factors are permitted before character built-in functions.<br />

| 9. Releases of <strong>HLASM</strong> prior to Version 1 Release 4 permitted predefined absolute<br />

| symbols in character expressions. To remove inconsistencies when handling<br />

| character and arithmetic expressions such usage is no longer permitted and<br />

| results in message ASMA137S if attempted. The built-in function BYTE can be<br />

| used to convert a numeric value in a character expression as shown.<br />

| RPTDS EQU X'1'<br />

| &RPTC1 SETC 'SEND '.(BYTE RPTDS)<br />

Concatenation of Character String Values: Character expressions can be<br />

concatenated to each other or to substring notations in any order. The resulting<br />

value is a character string composed of the concatenated parts. This concatenated<br />

string can then be used in the operand field of a SETC instruction, or as a value for<br />

comparison in a logical expression.<br />

You need the concatenation character (a period) to separate the single quotation<br />

mark that ends one character expression from the single quotation mark that begins<br />

the next.<br />

For example, either of the following statements may be used to assign the<br />

character value ABCDEF to the SETC symbol &BETA.<br />

&BETA SETC 'ABCDEF'<br />

&BETA SETC 'ABC'.'DEF'<br />

Chapter 9. How to Write Conditional Assembly Instructions 383

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!