Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@GETLIST - Read elements of a list variable

&pagelevel(3)&pagelevel

The @GETLIST statement writes elements of a list variable into the current work file.

Operation

Operands

F mode, L mode

@GETLIST

string [lines[,...]] [:cols[,...]:] [,CODE=name]

string

String which specifies the name of an S list variable.
Although the name must comply with the syntactic rules for S variable
names, EDT does not check these rules in full. If the name is longer than
246 characters then the statement is aborted with the message EDT3174.

lines

One or more line ranges which specify the list elements which are to be
taken over.

Only the list variable elements that are identified by this line range are read.
Element names and line numbers are assigned to one another in such a
way that 0.0001 stands for the 1st element in the list, 0.0002 for the 2nd
element etc.

If no element corresponds to a specified line number then the specification
is ignored.

If lines is not specified, then all the elements are read.

cols

One or more column ranges in the S variables that are to be read. The
ranges may repeat and overlap. Column n is assigned to the nth character.
All the specified characters are concatenated in the sequence in which the
columns are specified (possibly multiple times) and the result is inserted in
the work file. If the result is longer than 32768 characters then the statement
is aborted with the message EDT5474.

If a list element contains fewer characters than the specified column then a
blank is inserted for it.

If no column range is specified then each element is read in full.

name

Name of the character set in which the value of the S variable is to be
interpreted. 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 the specified S variable is not a list then the message EDT4910 is output. If the value of a list element is not of type STRING then the statement is aborted with the message EDT5343. If the list does not contain any elements then the message EDT5340 is output.

Line numbers are assigned using the procedure “Insertion at the current line number” (see section “Line number assignment”). If the maximum line number is reached, the statement is aborted and the message EDT5252 is output.

If a list element contains an invalid byte sequence (possible in Unicode character sets) then the statement is aborted and the message EDT5454 is output.

On insertion, the values are 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.

If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM then the processing of the statement is aborted and message EDT5501 is output.

For details on S variables, see the SDF-P User Guide [7].