*PPSD - Renumber Programs
Purpose
This utility renumbers program statements according to start, stop, and increment parameters supplied by the user. Programs may be renumbered in sections, but the order of statements may not be changed. All reference numbers in the program are correctly updated. For i8086-based systems, the valid range is 1 to 9999; in UNIX, 1 to 65534.
Procedure
To run this utility from Thoroughbred Basic Console Mode, type:
RUN “*PPSD” and press Enter.
To select this utility from the Thoroughbred Basic Utilities Menu, type one of the following:
P and press Enter.
*P and press Enter.
*PPSD and press Enter.
Menu option # and press Enter.
The following message is displayed:
DISC NAME OR NUMBER:
Type the name or number of the disk where the program is located and press Enter. The system prompts:
ENTER FILENAME OR MASK; (@) FOR ALL, (CR) TO END
Type up to 48 file names or masks and press Enter or type @ and press Enter. The “at” sign (@) will include all the programs in the directory. If a specified program does not exist on the disk the name is rejected. After entering each name or mask, press Enter once. After you have entered all the names or masks, press Enter again to continue with the procedure. To exit the utility, press F4.
ENTER RENUMBER PARMS
START 0001 END
For the first block, the first statement number is 0001; for remaining blocks, it is one greater than the end of the previous block. Type the number of the last statement in this block and press Enter or press Enter to set this entry to the maximum number of statements.
The system prompts:
AS
Type the new number for the first statement in the block and press Enter or press Enter to use the same statement number. The system prompts:
STEP
Type the increment to be used for this block and press Enter. Typing A and pressing Enter will set this entry to 0010. If 0 is entered this portion of the program will not be renumbered.
The utility prompts for renumber parameters until it has obtained the STEP option for the block ending at line 65534.
The system issues the message RENUMBERING along with the statement numbers being renumbered. When the procedure is complete, the system automatically returns to the DISC ID prompt.
Notes
If a program is uninitialized or blank, the message PROGRAM SKIPPED appears and the utility proceeds to the next program. While renumbering, the utility displays the name of the program it is working on and the old and new line numbers of the line it is currently renumbering.
Error Messages
- CAN'T DEFINE WORK PROGRAM!! ERROR=xx
- The utility could not define a work file due to space limitations. It attempts to proceed to the next program. This prompt is displayed if the directory is full or the permissions do not allow read/write access.
- LIMIT IS 48 NAMES/MASKS
- The maximum number of names or masks has been entered. The system begins to process the files.
- LINE NUMBER ERROR!! NEW LINE LESS THAN PREVIOUS
- Renumbering the program would have resulted in the first line of a block being numbered lower than the last line in a previous block. The utility continues with the next program.
- LINE NUMBER OVERFLOW!! PROGRAM NOT RENUMBERED
- Renumbering the program would result in a line number greater than 65534. The utility continues with the next program.
- MUST BE NUMERIC
- Type a valid statement number or numeric.
- MUST BE A POSITIVE INTEGER
- Type a valid statement number or increment.
From the Thoroughbred Basic Utilities, version 8.9.1. Open this page in the PDF