Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

R - Collect lines for multiple copying

&pagelevel(3)&pagelevel

The statement code R transfers the line numbers and work file numbers corresponding to the specified record to the EDT copy buffer so that the record can subsequently be copied multiple times using one of the statement codes A, B or O.

Statement code

Key

R

[DUE] or [F2]

As soon as one of the statement codes A, B or O is entered, the copy operation is executed, i.e. the records are inserted in the corresponding position. Unlike the statement codes C and M, R does not cause the content of the copy buffer to be deleted after the operation. It therefore remains available for further copy operations.

If, when R is specified, the copy buffer already contains entries that were generated using the statement codes C or M then the copy buffer is deleted before the specified line is entered and the message EDT0295 is output.

The copy buffer can also be filled with lines taken from different work files. The records determined by the copy buffer can then be copied into any work file.

The copy buffer contains the work file and line numbers of the records collected with R. The line numbers and content of the records that are to be copied should therefore not be modified between being collected with R and the performance of the copy operation with the statement codes A, B or O. However, if this does occur then the new contents are copied. If any records have been deleted in the interim then these are skipped without any warning during the copy operation.

Since the copy buffer only contains work file and line numbers, no conversion of the selected lines is performed during collection. Since the target character set is not determined until the target work file is specified, any conversion that is required is not performed until the statement codes A, B or O are evaluated (see section “Character sets”).

Note

If the screen is split then lines can be copied from the first to the second work window in a single dialog step. If items are copied from the second to the first work window then two dialog steps may be necessary depending on the processing sequence.

Example

Line 3.00 is to be copied to a position before line 7.00 and after line 8.00. This is achieved by entering statement code R in line 3.00, statement code B in line 7.00 and statement code A in line 8.00.

Line 3.00 has been copied to positions before line 7.00 and after line 8.00.