Line Numbering [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Line Numbering
HP EDIT supports the following types of file formats:
* Unnumbered
* Standard-numbered
* COBOL-numbered
* Variable
HP EDIT enables you to renumber a single line or range of lines, and can
also automatically renumber adjacent lines when required or whenever you
keep the file.
Unnumbered Files
When you create a file that does not currently exist, HP EDIT creates a
new unnumbered file by default. HP EDIT defines an unnumbered file as
one that contains fixed-length records and no line numbers. The New File
Type parameter in the Set Options screen controls the file type assigned
to newly created files. You can change this parameter to either
standard-numbered, COBOL-numbered, or variable before adding text or
before using the Text File command to create a new file.
If you decide during your session that you want to keep text to a file
type other than unnumbered, you can change the Keep File Type parameter
in the Set Options command screen to either standard-numbered,
COBOL-numbered, or variable.
Numbered Files
HP EDIT recognizes numbered files read in with the Text File command. If
the file has fixed-length records with strictly ascending eight-digit
numbers in the last eight columns, standard numbering is assumed. If the
file is of type EDTCT (1052) or if there are strictly ascending six-digit
numbers in the first six columns, COBOL numbering is assumed.
Displaying Line Numbers
You can display line numbers in a numbered file by enabling the Display
Line Numbers parameter of the Set Options command. When enabled, line
numbers appear at the beginning of each line of text in sequentially
ascending order.
Standard numbers occupy the last eight positions of a fixed-length record
and range from 0.001 to 99999.998. COBOL line numbers occupy the first
six columns of each line and range from 0.001 to 999.998. When HP EDIT
displays line numbers, it includes the assumed decimal point, if
necessary. It does not display leading and trailing zeros, however.
Editing Line Numbers
You can renumber one or more lines of a standard-numbered or
COBOL-numbered file. You use the Edit Line Number command to renumber a
single line of text and the Renumber Lines command to renumber a range of
lines. When you execute the Renumber Lines command, HP EDIT prompts you
for the beginning and ending range and the numbering increment. You can
specify a numbering increment as small as .001.
If you want HP EDIT to automatically renumber lines in sequential order
when you keep text, you can enable the Renumber Lines parameter from the
Set Options screen. Refer to the Set Options command in chapter 4 for
more information about this parameter.
Inserting Lines
You can insert new lines in any type of numbered file using the Insert
Line command. When you want to insert a line between two sequential line
numbers, HP EDIT automatically assigns a number to the new line that
preserves the sequential line numbering sequence.
For instance, if you want to insert a line between lines 1.5 and 1.6, HP
EDIT would insert line 1.51. If possible, the new value has the same
number of decimal places as the previous character. However, HP EDIT
must often insert an additional decimal place.
Bumping Lines
If you want to insert a new line between two sequential line numbers at
the thousandths level, HP EDIT cannot provide a new number one-tenth
larger than the previous number, because increments smaller than a
thousandth are not allowed. For instance, if you wanted to insert a line
between lines 1.412 and 1.413, HP EDIT would not insert line 1.4121.
Instead, it would attempt to bump line 1.413 and renumber it as 1.414.
This would enable the new line to be numbered as the former 1.413.
Before renumbering any lines, HP EDIT asks for your permission to perform
the bumping process. HP EDIT displays a range of line numbers that it
intends to renumber as well as the proposed new numbering scheme. If you
permit HP EDIT to bump the lines after the inserted line, HP EDIT
renumbers the lines specified in the prompt. HP EDIT only renumbers the
minimum number of lines necessary to retain the ascending line order. If
you reply no to the prompt, HP EDIT enters Text Entry mode at the cursor
position but does not insert a new line.
HP EDIT can perform automatic line bumping if you enable the Automatic
Bumping parameter from the Set Options screen. When you enable this
option, HP EDIT does not request your permission to renumber succeeding
lines when you insert additional lines.
MPE/iX 5.0 Documentation