Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
SETC instruction HLASM Language Reference SC26-4940-06 |
|
The SETC instruction assigns a character value to a SETC symbol. You can assign whole character strings, or concatenate several smaller strings together. The assembler assigns the composite string to your SETC symbol. You can also assign parts of a character string to a SETC symbol by using the substring notation; see Substring notation. A character string consists of any combination of characters enclosed in apostrophes. Variable symbols are allowed. The assembler substitutes the representation of their values as character strings into the character expression before evaluating the expression. Up to 1024 characters are allowed in a character expression. You can change the character value assigned to a SETC symbol.
This lets you use the same SETC symbol with different values for character
comparisons in several places, or for substituting different values
into the same model statement.
>>-variable_symbol--SETC--character_value----------------------><
The assembler assigns the character string value represented in the operand field to the SETC symbol in the name field. The string length must be in the range 0 (null character string) through 1024 characters. When a SETA or SETB symbol is specified in a character expression, the unsigned decimal value of the symbol (with leading zeros removed) is the character value given to the symbol. A duplication factor can precede a character expression or substring
notation. The duplication
factor can be any non-negative arithmetic expression allowed in the
operand of a SETA instruction. For example:
assigns
the value 'ABCABCABC' to &C1.A zero duplication factor results in a null (zero-length) string.
Notes:
Figure 1. Defining character
(SETC) expressions
┌───────────┐ │ │ │Character │ │Expression │ │ │ └─────┬─────┘ │ V Can be any of ├─────────────┬─────────────┬──────────────────────┐ V V V V ┌─────┴─────┐ ┌─────┴──────┐ ┌────┴──────────────┐ ┌─────┴────────┬────────────┐ │ │ │ │ │ │ │ │ │ │ Character │ │ CharExpr │ │ Character-Valued │ │ (Duplication │ CharExpr │ │ Value │ │ . <──┐ │ │ Built-In Function │ │ Factor) │ │ │ │ │ CharExpr │ │ │ │ │ │ │ └─────┬─────┘ └──────────┼─┘ └───────────────────┘ └──────────────┴────────────┘ │ │ │ └── Period (.) = Concatenation Character V Can be any of ├─────────────┬─────────────┬─────────────┐ V V V V ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ │ Substring │ │ Variable │ │ Self- │ │ Attribute¹│ │ │ │ Symbol │ │ Defining │ │ Reference │ │ │ │ │ │ Term │ │ │ │ │ │ │ │ │ │ T' or O' │ └───────────┘ └───────────┘ └───────────┘ └───────────┘ Note:
|
Copyright IBM Corporation 1990, 2014
|