UpEditing a Source File > UpCOBOL Editor Previous Next

Support of the Automatic Numbering Function

The editor supports the automatic numbering function for sequence numbers. The editor supports the following two numbering patterns:

  1. Pattern A
    Every line in a file has a sequence number consisting of six digits (0 to 9), and the sequence numbers are arranged in ascending order.
  2. Pattern B
    All patterns other than pattern A

The sequence number area cannot be edited. The following table summarizes how the editor operates when a number is added manually.

Adding a new line to the end of a file

In numbering with pattern B, a 6-byte area is allocated as a sequence number area to this added line. In numbering with pattern A, the line number of this added line is obtained by adding the incremental value to the last sequence number. If the line number would exceed 999999, the incremental value is set to 1. When a line is added after sequence number 999999, pattern A is changed to pattern B.

Inserting a new line

In numbering with pattern B, a 6-byte area is allocated as a sequence number area to this new line. In numbering with pattern A, the line number of this new line is obtained by adding the incremental value to the sequence number of the preceding line. If the line number would be higher than the sequence number of the next line, the incremental value is set to 1. Note that if the line number obtained by adding an incremental value of 1 exceeds the sequence number of the next line, the next line and subsequent lines are renumbered.

Deleting a line

Sequence numbers are not renumbered when a line is deleted.

Pasting a line

Same as the processing for inserting a new line


Previous Next

All Rights Reserved, Copyright (C) FUJITSU LIMITED 2003-2005