Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@SEPARATE - Perform line break

&pagelevel(3)&pagelevel

The @SEPARATE statement breaks the specified lines into multiple lines. The point at which the break takes place is specified by a separator character or by a column position.

Operation

Operands

F mode, L mode

@SEPARATE

[lines [,...] ] [AT {strchar | col} ]

lines

One or more line ranges in which line breaks are to be inserted. If the lines
operand is not specified then all the lines in the file are processed.

AT

This operand introduces the definition of the point where the lines are to be
broken.

If the AT operand is not specified then the record separator defined as the
default using @PAR SEPARATOR determines the break position (see the
@PAR SEPARATOR statement). If no default record separator has been
defined then the error message EDT4952 is output.

strchar

This operand specifies the record separator character for line breaks. It may
be any character which must be specified in single quotes. The character
can also be specified in the form of a substitute representation for Unicode
characters.

col

This operand specifies the number of the column at which the line break is
to be performed.

If the break is performed using a record separator character then no break is inserted in lines in the specified line range which do not contain this record separator.

In contrast, if a line in the specified line range contains one or more record separator characters then the line is searched through from left to right for the first occurrence of the record separator character.

All the characters before the first record separator character remain in the original line while all the characters after the record separator character (including any other record separators that may be present) are inserted as a new line in the work file.
The record separator character at which the line break is performed is removed, i.e. it is no longer present either in the original or in the newly inserted line.
If the newly inserted line itself contains further record separator characters then the procedure described above is repeated for this line. This operation continues until a newly inserted line contains no further record separator characters.

If the line contains several record separator characters which immediately follow one another or if the line starts or ends with one or more record separator characters then empty records (record length=0) are inserted.

If the point of the break is defined by means of a column number then all the characters as of this position (including the character in the specified column) are separated from the original line and inserted as a new line in the work file. If the new line still contains the same number as or more columns than are specified in the col operand then this line is itself broken at column col. This operation is repeated until the newly inserted line has fewer columns than are specified in the col operand.

If the original line possesses fewer columns than are specified in the col operand or if col=1 is specified in the statement then the line is not modified.

The lines created as a result of the line break operation are numbered using the procedure Insertion between two lines (see section “Line number assignment”).

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.

Example 1

A printed list is to be made narrower:

@SEPARATE 5-100 AT 41

Lines 5 to 100 are shortened to a length of 40 characters. The remaining characters of each line are inserted after each line in the file.

Example 2

Records contain line feed characters (= U'000A' in UTF16) which are to be evaluated (for the purposes of this example, it is assumed that the character % has been declared as the escape character for the substitute representation of Unicode characters, by means of the @PAR ESCAPE-CHARACTER statement):

@SEPARATE & AT '%U000A'