11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

Substring notationThe following statement assigns the character value L’SYMBOL to the SETCsymbol &LENGTH.&LENGTH SETC ’L’’SYMBOL’2. A double ampersand generates a double ampersand as part of the value of acharacter expression. To generate a single ampersand in a character expression,use the substring notation; for example:&AMP SETC ’&&’(1,1)Note: A quoted single ampersand ’&’ is not a valid character string.The following statement assigns the character value HALF&& to the SETC symbol&AND.&AND SETC ’HALF&&’This is the only instance when the assembler does not pair ampersands toproduce a single ampersand. However, if you substitute a SETC symbol withsuch a value into the nominal value in a DC instruction operand, or theoperand of an MNOTE instruction, when the assembler processes the DC orMNOTE instruction, it pairs the ampersands and produces a single ampersand.3. To generate a period, two periods must be specified after a variable symbol.For example, if &ALPHA has been assigned the character value AB%4, thefollowing statement can be used to assign the character value AB%4.RST to thevariable symbol &GAMMA.&GAMMA SETC ’&ALPHA..RST’4. To generate a period, the variable symbol may have a period as part of itsvalue. For example:&DOT SETC ’.’&DELTA SETC ’A&DOT.&DOT’ &DELTA has value ’A..’5. Double-byte data can appear in the character string if the assembler is invokedwith the DBCS option. The double-byte data must be bracketed by the SO andSI delimiters, and the double-byte data must be valid.6. The DBCS ampersand and apostrophe are not recognized as delimiters.7. A double-byte character that contains the value of an EBCDIC ampersand orapostrophe in either byte is not recognized as a delimiter when enclosed by SOand SI.8. Duplication (replication) factors are permitted before character built-infunctions.9. Releases of <strong>HLASM</strong> prior to Version 1 Release 4 permitted predefined absolutesymbols in character expressions. To remove inconsistencies when handlingcharacter and arithmetic expressions such usage is no longer permitted andresults in message ASMA137S if attempted. The built-in function BYTE can beused to convert a numeric value in a character expression as shown.RPTDS EQU X’01’&RPTC1 SETC ’SEND ’.(BYTE RPTDS)Concatenation of character string values: Character expressions can beconcatenated to each other or to substring notations in any order. The resultingvalue is a character string composed of the concatenated parts. This concatenatedstring can then be used in the operand field of a SETC instruction, or as a valuefor comparison in a logical expression.You need the concatenation character (a period) to separate the single quotationmark that ends one character expression from the single quotation mark thatbegins the next.Chapter 9. How to write conditional assembly instructions 377

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

Saved successfully!

Ooh no, something went wrong!