SETC instruction
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 4064 characters are allowed in a character expression.
- variable symbol
- Is a variable symbol.
A global variable symbol in the name field must have been previously declared as a SETC symbol in a GBLC instruction. Local SETC symbols need not be declared in an LCLC instruction. The assembler considers any undeclared variable symbol found in the name field of a SETC instruction as a local SET symbol. The variable symbol is assigned a type attribute value of U.
- character_value
- Is a character value specified by:
- An operation code attribute reference
- A type attribute reference
- A character expression
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 4064 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.
&C1 SETC (3)'ABC'
assigns
the value 'ABCABCABC'
to &C1
.- The assembler evaluates the represented character string (in particular,
the substring; see Substring notation) before
applying the duplication factor. The resulting character string is
then assigned to the SETC symbol in the name field. For example:
assigns the value&C2 SETC 'ABC'.(3)'ABCDEF'(4,3)
'ABCDEFDEFDEF'
to&C2
. - If the character string contains double-byte data, then redundant
SI/SO pairs are not removed on duplication. For example:
assigns the value&C3 SETC (3)'<.A.B>'
'<.A.B><.A.B><.A.B>'
to&C3
. - To duplicate double-byte data, without including redundant SI/SO pairs,
use the substring notation. For example:
assigns the value&C4 SETC (3)'<.A.B>'(2,4)
'.A.B.A.B.A.B'
to&C4
. - To duplicate the arithmetic value of a previously defined ordinary
symbol with an absolute value, first assign the arithmetic value to
a SETA symbol. For example:
assigns the valueA EQU 123 &A1 SETA A &C5 SETC (3)'&A1'
'123123123'
to&C5
.

- The attribute reference term must not be preceded by a duplication factor.