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. |
lines | One or more line ranges which specify the list elements which are to be Only the list variable elements that are identified by this line range are read. If no element corresponds to a specified line number then the specification If |
cols | One or more column ranges in the S variables that are to be read. The If a list element contains fewer characters than the specified column then a 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 |
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].