Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

String variables

&pagelevel(4)&pagelevel

The string variables, (#S0..#S20) can be used to store strings in all character sets supported by EDT.
A string variable is similar to a record in a work file.
Like a record, it can accommodate a maximum of 32768 characters which can be addressed either individually or in sections thanks to column specifications, they can be searched in, replaced by other strings etc.

The integer variables can be supplied with values by means of the @SET statement, formats 2, 4 and 5, by means of @CREATE or using @GETJV, @GETVAR or @GETLIST. @PRINT can be used to output the content of the string variables on screen. @IF (format 2) is used to evaluate the values of string variables within EDT procedures and column specifications make it possible to address subsections or individual lines.

When EDT is started, string variables are preset to a blank in the character set EDF041 unless they have assumed the values of any S variables SYSEDT-S00..SYSEDT-S20 which may be present (see section “Starting EDT”).

Every string variable is assigned a character which specifies how the content of the variable is to be interpreted.
In the case of the @CREATE and @SET statements as well as in @GETJV and
@GETVAR, this character set can be specified explicitly for the new string variable that is to be filled. If no character set is specified or if the string variables are already assigned values when EDT is started (see above) then the default values for the string variables are set as a function of the data source and system environment.

In statements in which the name of a string variable could be confused with a file name or a library element designation, it is necessary to prefix the variable name with a period in order to indicate that a string variable is intended, e.g. @OPEN FILE=.#S1 opens the file whose name is stored in the string variable #S1 whereas @OPEN FILE=#S1 opens the file with the name '#S1'.