RESEQ

Syntax

── RESEQ ─┬──────────────────┬─┬────────┬─┬────────────┬───────────────┤
          ├─<sequence range>─┤ └─<base>─┘ └─ + ──<inc>─┘
          └─ OVERRIDE ───────┘

Explanation

The RESEQ command assigns new sequence numbers to lines in the work file without changing the order of appearance of any lines.

An initial value is assigned as the sequence number of the first line to be resequenced. The value is incremented for each subsequent line.

If a <sequence range> is specified, only the specified part of the work file is resequenced. By default, the entire work file is resequenced.

An initial value can be specified as the integer <base>; otherwise, the starting value of the sequence range is used. An <inc> value can be specified as the increment for successive new sequence numbers. If no increment is specified, the increment from the most recent MOVE, INSERT, RESEQ, or SEQ command is used. The default of 100 is assumed if no such command has occurred since the last MAKE, GET, or DELETE ALL command.

If a <sequence range> is specified, the new sequence numbers must fall within the bounds of that <sequence range>. RESEQ does not change the order in which the lines appear.

The OVERRIDE option causes all data currently in the sequence field of the file to be ignored. This option can be used only with a complete file that has no pending changes. The expected application is GET <file title>; RESEQ OVERRIDE, thereby sequencing a file that was previously unacceptable to CANDE because of sequence errors or nondigits in the sequence field.

The UPDATE command is implicitly invoked after the RESEQ command has been executed.

Examples

list
5 FIRST LINE
30 SECOND
72 THIRD
73 FOURTH
150 FIFTH
1000 SIXTH
#

reseq
#UPDATING
#

l
100 FIRST LINE
200 SECOND
300 THIRD
400 FOURTH
500 FIFTH 
600 SIXTH
#

reseq 123-456 +5
#UPDATING
#

l
100 FIRST LINE
200 SECOND
205 THIRD
210 FOURTH
500 FIFTH
600 SIXTH
#