11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Substring notationTable 61. Use of character expressions (continued)Used in Used as ExampleAIF or SETB instruction Character string incharacter relationAIF (’&C’ EQ ’STRING1’).BSubstring notation First part of notation ’SELECT’(2,5) returns ’ELECT’Built-in functions Operand &VAR SETC (LOWER ’&twenty.&six’)&AB SETA A2B(’10’)Character-valued built-in functions: Character-valued built-in functions havearithmetic-only operands, character-only operands, or both arithmetic andcharacter operands. Each type is described in a separate section. The maximumstring length of any SETC variable is 1024 bytes. If this length is exceeded, thestring value is truncated, and message ASMA091E is generated.|The following discussion uses these special notations:n The EBCDIC character containing all 0 bits.f The EBCDIC character containing all 1 bits.Here are the SETC built-in functions:A2B Format: Function-invocationOperands: ArithmeticOutput: A2B(aexpr) converts the value of its arithmetic argument to astring of 32 zero (’0’) and one (’1’) characters. The value of aexpr must berepresentable as a 32-bit binary integer. If the aexpr argument is negative,the result contains 32 characters, the first of which is ’1’.ExamplesA2B(0) has value ’00000000000000000000000000000000’A2B(5) has value ’00000000000000000000000000000101’A2B(1022) has value ’00000000000000000000001111111110’A2B(-7) has value ’11111111111111111111111111111001’A2B(2345678901) indicates an error (value too large)A2C Format: Function-invocationOperands: Arithmetic|Output: A2C(aexpr) converts the value of its arithmetic argument to astring of four characters whose bit pattern is the same as the argument’s.ExamplesA2C(0) has value ’nnnn’ (4 EBCDIC nulls)A2C(241) has value ’nnn1’A2C(20046) has value ’nn++’A2C(-252645136) has value ’0000’A2D Format: Function-invocationOperands: ArithmeticOutput: A2D(aexpr) converts the value of its arithmetic argument to astring of decimal digits preceded by a plus or minus sign.Note: The A2D function is similar to the SIGNED function, except thatA2D always provides an initial sign character.Chapter 9. How to write conditional assembly instructions 369

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

Saved successfully!

Ooh no, something went wrong!