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 notationStatement 1 assigns the substring character value FIELD (the first five characterscorresponding to symbolic parameter &TO to the SETC symbol &PREFIX. Therefore,FIELD replaces &PREFIX in statement 2.Notes:1. If the COMPAT(SYSLIST) assembler option is not specified, you can pass asublist into a macro definition by assigning the sublist to a SETC symbol, andthen specifying the SETC symbol as an operand in a macro instruction.However, if the COMPAT(SYSLIST) assembler option is specified, sublistsassigned to SETC symbols are treated as a character string, not as a sublist.2. Regardless of the setting of the COMPAT(SYSLIST) assembler option, you cannot pass separate (as opposed to a sublist of) parameters into a macrodefinition, by specifying a string of values separated by commas as the operandof a SETC instruction and then using the SETC symbol as an operand in themacro instruction. If you attempt to do this, the operand of the SETCinstruction is passed to the macro instruction as one parameter, not as a list ofparameters.Concatenating substring notations and character expressions: Substringnotations (see “Substring notation” on page 366) can be concatenated withcharacter expressions in the operand field of a SETC instruction. If a substringnotation follows a character expression, the two can be concatenated by placing aperiod between the terminating single quotation mark of the character expressionand the opening single quotation mark of the substring notation.For example, if &ALPHA has been assigned the character value AB%4, and &BETA hasbeen assigned the character value ABCDEF, the following statement assigns &GAMMAthe character value AB%4BCD:&GAMMA SETC ’&ALPHA’.’&BETA’(2,3)If a substring notation precedes a character expression or another substringnotation, the two can be concatenated by writing the opening single quotationmark of the second item immediately after the closing parenthesis of the substringnotation.Optionally, you can place a period between the closing parenthesis of a substringnotation and the opening single quotation mark of the next item in the operandfield.If &ALPHA has been assigned the character value AB%4, and &ABC has been assignedthe 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 charactervalue assigned to the SETC symbol must be 1-to-10 decimal digits (not greater than2147483647), or a valid self-defining term.||If a SETA symbol is used in the operand field of a SETC statement, the magnitudeof the arithmetic value is converted to an unsigned integer with leading zerosremoved. If the value is 0, it is converted to a single 0.380 <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!