Top
NetCOBOL V11.0 NetCOBOL Studio User's Guide
FUJITSU Software

5.5 Sequence Numbers

The COBOL editor supports automatic numbering of sequence numbers. The COBOL editor supports the following two patterns of sequence numbers:

Pattern A

Every line in a file has a six-digit sequence number, and the lines are sorted in ascending order.

Pattern B

Patterns other than pattern A.

Sequence numbers can be edited. The following table describes the operation of the COBOL editor when lines are numbered manually.

Adding a new line at the end of a file

In pattern A, the sequence number for a new line is the sequence number of the last line plus the increment value. If the calculated value is greater than 999999, 1 is set as the increment value. If a line is being added after the line whose sequence number is 999999, the numbering is switched to pattern B. In numbering in pattern B, a six-byte space is assigned for the sequence number area of the newly line.

Inserting a new line

In pattern A, the sequence number for a new line is the sequence number of the previous line plus the increment value. If the calculated value is the sequence number of the next line or greater, 1 is set as the increment value. However, if adding 1 to the sequence number of the previous line results in a value equal to or greater than the sequence number of the next line, the next and subsequent lines are renumbered. In pattern B, a six-byte space is assigned for the sequence number area of the new line.

Deleting a line

When a line is deleted, lines are not renumbered.

Pasting a line

The processing is the same as for inserting a new line.

Note

Sequence numbers are not targeted in revision history comparisons. Therefore, simply reassigning sequence numbers does not correct them. However, when replacing from a revision history, the sequence numbers are also replaced.