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.

SETA instructionB2A(’’) has value 0B2A(’0000000101’) has value 5B2A(’11111111111111111111111111111110’) has value -2C2A Format: Function-invocationOperands: CharacterOutput: C2A(’charstring’) converts a character string of zero to fourcharacters to a binary arithmetic value having the same bit pattern.v Fewer than four characters are padded internally on the left withEBCDIC null characters to a length of four characters.v An error condition is detected if the argument length exceeds 4characters, generating the message ASMA214E.v Null argument strings return zero.The result of C2A is the same as would be obtained from&value SETA C’charstring’except that C2A gives a zero result for null strings, and does not pairapostrophes or ampersands before conversion.ExampleC2A(’’) has value 0C2A(’+’) has value 78C2A(’1’) has value 241C2A(’0000’) has value -252645136D2A Format: Function-invocationOperands: Character|Output: D2A(’decstring’) converts a character string argument containingan optional leading plus or minus sign followed by decimal digits to anarithmetic value. Error conditions are detected ifv the argument contains invalid charactersv no digits are present following a signv the argument length exceeds 11 charactersv the resulting value is too largeNull argument strings return zero.The result of the D2A function is the same as&value SETA decstringexcept that SETA does not allow leading plus or minus signs.ExamplesD2A(’’) indicates an error conditionD2A(’000’) has value 0D2A(’10’) has value 10D2A(’+100’) has value 100D2A(’-5’) has value -5DCLENFormat: Function-invocationOperands: CharacterOutput: DCLEN(’cexpr’) returns the length of its argument string afterpairs of apostrophes and ampersands have been internally replaced bysingle occurrences. No change is made to the argument. Such pairingoccurs only once; that is, three successive occurrences of an apostrophe orampersand will result in two occurrences, not one.350 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!