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 3) - Supply values for line number variables

&pagelevel(3)&pagelevel

This format of the @SET statement is used to assign values to line number variables. This value may consist of: a line number specification, the value of an integer variable, the specification of a line number as a string or the binary value of the first 4 bytes in a string.

Operation

Operands

F mode, L mode

@SET

lvar = { line
          | ivar
          | SUBSTR string
          | STRING string[,CODE=name] }

lvar

line

ivar

Line number variable (#L0..#L20) which is to be supplied with a value.

Line number which is to be assigned to the line number variable.

Integer variable (#I0..#I20) whose content is to be supplied to the line
number variable in converted form. In this case, the permitted range of
values for ivar is 1 to 99999999. This results in the line numbers 0.0001
to 9999.9999. On conversion, therefore, the value of the integer is divided
by 10000 and the resulting value is assigned to the line number variable. If
the value of the integer variable is outside of the valid range then the
statement is rejected with the message EDT5475.

SUBSTR string

String which is converted into a line number and assigned to the line number variable. If the string does not represent a valid line number then the
statement is rejected with the message EDT5477. If the string contains
blanks then these are eliminated during conversion.
Empty strings are not permitted and result in the error EDT3907.

STRING string

String whose binary value is interpreted as a line number and assigned to the line number variable. In this case the 8 half bytes in the first 4 bytes of the string are each interpreted as a decimal digit.

If the string contains fewer than 4 bytes after conversion then it is left-filled with zeros.

If the binary value of one of the half bytes in the first 4 bytes of the string does not correspond to a decimal digit 0..9 then the statement is rejected with the message EDT4928.
Empty strings are not permitted and result in the error EDT3907.

name

Character set in which the string is to be interpreted. The string is converted
into this character set before being assigned. The first 4 bytes are then
assigned without regard for character boundaries.

If the string 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 not specified then the character set of the specified string
(which depends on the source) is used.

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 #L0 = 1.01 ----------------------------------------------- (1)
   1.     @SET #I0 = #L0 ------------------------------------------------ (2)
   1.     @SET #L1 = #I0 ------------------------------------------------ (3)
   1.     @SET #L2 = SUBSTR '1.01' -------------------------------------- (4)
   1.     @SET #L3 = STRING X'00010100' --------------------------------- (5)
   1.     @STATUS = L --------------------------------------------------- (6)
#L00=   1.0100    #L01=   1.0100    #L02=   1.0100 
#L03=   1.0100    #L04=   0.0000    #L05=   0.0000 
#L06=   0.0000    #L07=   0.0000    #L08=   0.0000 
#L09=   0.0000    #L10=   0.0000    #L11=   0.0000 
#L12=   0.0000    #L13=   0.0000    #L14=   0.0000 
#L15=   0.0000    #L16=   0.0000    #L17=   0.0000 
#L18=   0.0000    #L19=   0.0000    #L20=   0.0000 
(1)The value 0001.0100 is assigned to the line number variable #L0.
(2)The value 10100, line number 1.01 * 10000, is assigned to the integer variable #I1.
(3)The value 0001.0100 is assigned to the line number variable #L1.
(4)The value 0001.0100 is assigned to the line number variable #L2.
(5)The value 0001.0100 is assigned to the line number variable #L3.
(6)The content of the line number variable is output.