Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@SETLIST - Extend list variable

&pagelevel(3)&pagelevel

The @SETLIST statement assigns elements to an S list variable. In this case, values are taken over from lines in the current work file or from string variables.

If no values are specified then the content of the S list variable is deleted.

Operation

Operands

F mode, L mode

@SETLIST

string { [lines[,...] ] [MARK [m] ] | svar} [:cols[,...]:]
[,] [MODE={ APPEND | PREFIX | OVERWRITE} ] [,CODE =name]

string

String which specifies the valid 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.

lines

One or more line ranges whose contents are to be taken over into the S list
variable. If no lines are present in the specified line range then the message
EDT2903 is output. If no line range is specified then all the lines in the
current work file are used.

MARK

Only marked lines in the specified line ranges are to be taken over. If MARK
is not specified then all the lines are taken over.

m

Number of the record mark (1..9) that is to be used as a selection criterion.
If m is not specified, then only data lines with record mark 1 are used.

svar

cols

Name of a string variable whose content is to taken over as an element.

One or more column ranges whose characters are to be taken over. The
ranges may repeat and overlap.
If a line in a column that is to be used does not contain any characters then
a blank is inserted instead of it.
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 list element.

If the operand is not specified, the entire line is taken over.

MODE=  Specifies the way in which a list is to be extended.

APPEND

The list is extended at the end, i.e. the new list elements are appended after the last element (default value).

PREFIX

The list is extended at the start, i.e. the new list elements are inserted before
the first element.

OVERWRITE


The content of the S list variable is first deleted. The new list elements are
then taken over.

If no line is present in the specified line range then the S list variable is not
assigned any further elements. In F mode, the message EDT0211 informs
the user of this.

name

Character set in which the string for assignment is to be converted before
being assigned. If name is not specified, EDF041 is used. The character set
name must be known in XHCS; otherwise, the statement is rejected with
message EDT4980.

The comma in front of the MODE operand must be specified in order to distinguish it from MARK if no other operand is specified apart from the list name or any range specification.

The list variable must already exist. If it does not, the message EDT5274 is issued. If it is not a list variable, the message EDT4910 is output. If the list variable is not of type STRING or ANY then the statement is rejected with the message EDT5343.

If an S variable is extended by means of APPEND or PREFIX then, in F mode, the message EDT0210 is output to inform the user of this.

In L mode, if the work file is empty and a line range (not a string variable) has been specified then the message EDT2903 is output.

If the string that is to be assigned contains characters which are invalid in the specified character set then these characters are replaced by a substitute character provided that such a character has been specified (see @PAR SUBSTITUTION-CHARACTER); otherwise, no assignment is performed and statement is aborted with the error message EDT5453.

If the value that is to be assigned is longer than 4096 bytes then only the first 4096 bytes are assigned as a value and the message EDT2403 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 list variables, see the SDF-P User Guide [7].