Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@ON (format 4) - Copy marked lines

&pagelevel(3)&pagelevel

This format of the @ON statement copies all the records marked with the specified record mark in the searched line ranges into the specified work file.

Operation

Operands

F mode, L mode

@ON

lines[,...] [:cols[:]] FIND [ALL] [F] [R] [NOT] MARK m

[COPY [TO] ] (procnr) [KEEP] [OLD]

lines

cols

One or more line ranges in which the search is to be performed.

Although the column range may be specified, this has no significance since
only record marks are searched for.

ALL

Although the specification is permitted, it is pointless since a record can only
be marked once.

F

Only the first hit record with the specified record mark in each specified line
range is copied. If F is not specified then all the records with the specified
record mark in each specified line range are copied.

R

This specification is of no significance since the search direction is irrelevant
when searching for record marks.

NOT

If NOT is specified then records which possess a record mark other than the
specified record mark m are copied. If NOT is not specified then records
which possess the record mark m are copied.

This format cannot be used to copy records which do not have a record
mark.

m

procnr

Number of the record mark (1..9) that is to be searched for.

The number of the work file (0..22) to which the hit lines are to be copied.

An active work file or the current work file may not be specified. If OLD is not
specified and hit records are found then the target work file is deleted in full
before the copy operation (see @DELETE, format 2). If no hit records are
found then the content of the target work file remains unchanged.

KEEP

The line numbers of the hit records are retained on copying. If KEEP is not
specified, EDT creates the target work file as of the current line number
which is increased by the current increment for each copied hit record.

OLD

The content of the target work file is not deleted before the copy operation.
Any existing lines which have the same line number in the work file are
overwritten. If OLD is not specified and hit records are found then the target
work file is deleted in full before the copy operation (see @DELETE, format
2).

If the specified work file is empty or has been completely deleted and has the character set *NONE then it is assigned the character set of the current work file when the copy operation is performed.

If the specified work file has a character set then the lines that are to be copied are converted into this work file's character set. If characters which cannot be displayed in the work file's character set are identified then these characters are replaced by a substitute character provided that such a character has been specified (see @PAR SUBSTITUTION-CHARACTER); otherwise, the @ ON statement is rejected and error message EDT5453 is output.

When lines are copied to the target work file, record marks are not taken over.

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

Line range 1 to 5 is to be checked for record mark 2 and the hit records are to be copied together with their line numbers to work file 3. Processing then branches to work file 3.