Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@GETVAR - Read S variable

&pagelevel(3)&pagelevel

The @GETVAR statement outputs the value of an S variable, writes it to a work file or assigns it to a variable.

Operation

Operands

F mode, L mode

@GETVAR

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

string

String which specifies a valid S variable name. Although the name must
comply with the syntactic rules for S variable names, EDT does not check
these rules in full.

line

Number of the line to which the value of the S variable is to be written.

If the value of the S variable is not of type STRING then the statement is
aborted with the message EDT5342.

svarex

String variable in which the value of the S variable is to be written.

If the value of the S variable is not of type STRING then the statement is
aborted with the message EDT5342.

ivar

Integer variable (#I0..#I20) into which the content of the S variable is to
be taken over.

If the value of the S variable is not of type INTEGER then the statement is
aborted with the message EDT5342.

SYSEDT

If they exist and their values are of the type STRING then the contents of the
S variables SYSEDT-S00..SYSEDT-S20 are assigned to the string
variables #S00..#S20. In the case of non-existent S variables, S variables
with no value or S variables of a different type, no error is reported. Instead
the associated string variable is not modified.

name

Name of the character set in which the value of the S variable is to be
interpreted. If the value of the S variable is not of type STRING then the specification
is ignored. The character set name must be permitted; otherwise, the
statement is rejected with message EDT4980. If the operand is not
specified, the value of the S variable is interpreted in the character set
EDF041 (see section “Character sets”).

If neither line nor svarex nor ivar is specified then the value of the S variable is output to SYSOUT in interactive mode and in batch mode it is output to SYSLST.

If the S variable is not present then the message EDT5274 is output. If it has no value then the message EDT5340 is output (except in the case of SYSEDT).

If a line with a number greater than the previous highest line number is created then the current line number is modified.

If the variable contains an invalid byte sequence (possible in Unicode character sets) then it is not read and the message EDT5454 is output.

If it is assigned to a string variable then this is also assigned the character set specified implicitly or explicitly via name.
If it is inserted in a work file then the value is converted into the work file's character set. If the work file is empty and has the character set *NONE then it is assigned the character set specified explicitly or implicitly via name.
If the string that is to be assigned contains characters which cannot be converted into the work file's 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 string is not assigned and the error message EDT5453 is output.

For details on S variables, see the SDF User Guide [6].