The @RENUMBER statement is used to renumber the lines present in the work file. The user can specify both the line number which is to accommodate the first line in the work file and the increment which is to be used for renumbering. This increment also becomes the new current increment (independently of whether it is specified explicitly or defined implicitly by means of the specified line number) The new, current line number is then calculated as the highest line number after renumbering plus the current increment value.
Operation | Operands | F mode, L mode |
@RENUMBER | [line [(inc)] ] |
line | This operand specifies the line number which is to contain the first line in the work file after renumbering. If the |
inc | This operand specifies the new current increment. If |
The @RENUMBER statement cannot be used for a file opened for real processing with @OPEN (format 2).
If the work file is empty then @RENUMBER is ignored and, in particular, no new increment is set.
If the statement is issued in interactive mode and lines would be lost because the greatest possible line number is reached then the following message is output:
|
|
If the user responds N to message EDT0911
then the @RENUMBER statement is not executed. In contrast, if the user responds Y
to message EDT0911
then the @RENUMBER statement is executed, excess lines are deleted and the message EDT2904
is output.
In F mode, the file section displayed in the data window is usually retained following renumbering with the @RENUMBER statement. Only the number display changes. The only exception here is if renumbering causes lines that were previously visible in the data window to be lost at the end of the work file. After renumbering, the lost lines are no longer displayed in the data window. If renumbering causes the loss of all the lines visible in the data window then only the last line of the work file that is still present after renumbering is still displayed in the data window.
The execution of the @RENUMBER statement is not aborted if the EDT session is continued with /INFORM-PROGRAM
after being interrupted with [K2].
Note
The line number/increment pairs stored in an internal memory area by the @SET statement (format 6) (see @SET statement, format 6) are not modified by the @RENUMBER statement and the same also applies to any line numbers present in the copy buffer (see statement codes, C
, R
, M
).
Once renumbering has been performed successfully using the @RENUMBER statement, the lines that were originally identified by the line numbers stored in these two areas may therefore have new line numbers.
It is not therefore usually of any value to access the line numbers stored in these two areas (using the @SET statement without operands or the statement codes A
, B
or O
) after renumbering using the @RENUMBER statement.