Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@SET (format 2) - Supply values for string variables

&pagelevel(3)&pagelevel

This format of the @SET statement is used to assign values to string variables. This value can be the binary value of an integer variable, a line number or the name of a string variable. It is also possible to assign a string. In both cases, a new string variable is created.

Operation

Operands

F mode, L mode

@SET

svarex {=INTERNAL {ivar | line | svar}
          | =string [,CODE=name] }

svarexString variable (#S0..#S20) which is to be supplied with a value.
INTERNAL ivarInteger variable (#I0..#I20) whose content is to be supplied to the string
variable in binary form. The result is not usually printable. The character set
is EDF041.
INTERNAL lineLine number which is to be assigned to the string variable as a binary value.
In this case, each of the 8 digits in the line number are assigned to a half
byte in binary form. The result is not usually printable. The character set is
EDF041.
INTERNAL svar

String variable (#S0..#S20) whose name is to be supplied to the string
variable as a value. The character set is EDF041.

string

name

String which is to be assigned to the string variable.

Character set which is to be assigned to the string variable. The string
string is converted into this character set before being assigned. If it
contains characters which are invalid in the target character set then these
characters are replaced by a substitute character provided that such a
character has been specified (see @PAR SUBSTITUTION-CHARACTER);
otherwise, the statement is rejected with the error message EDT5453.
If the operand is missing then the string variable is assigned the character
set of the string that is to be supplied to it.

In this statement, the statement name may be omitted entirely. In F mode, it is also permissible to omit the statement symbol.

Example

1.     @SET #I0 = -2122153084 ---------------------------------------- (1)
1.     @SET #S0 = INTERNAL #I0 --------------------------------------- (2)
1.     @SET #S1 = INTERNAL 4081.4082 --------------------------------- (3)
1.     @SET #S2 = INTERNAL #S0 --------------------------------------- (4)
1.     @SET #S3 = 'ABC' ---------------------------------------------- (5)
1.     @PRINT #S00.-#S03 --------------------------------------------- (6)
  #S00 abcd
  #S01  a b
  #S02 #S00 
  #S03 ABC 
(1)The value -2122153084 is assigned to the integer variable #I0.
(2)The value X'81828384' is assigned to the string variable #S0.
(3)The value X'40814082' is assigned to the string variable #S1.
(4)The value '#S00' is assigned to the string variable #S2.
(5)The value 'ABC' is assigned to the string variable #S3.
(6)The string variables #S00-#S03 are output.