RENUM [ HP RPG/XL Utilities-Part 2 RISE ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 2 RISE
RENUM
RENUM renumbers sequence line numbers.
Form
[lb/le] [BYinc]
BOTH [BYinc]
R[ENUM] SO[URCE] [BYinc]
SO[URCE] W[ITH] SE[QNUM]
SE[QNUM] W[ITH] SO[URCE]
Parameter Explanation
Parameter option 1:[lb/le] [BY inc]
Renumbers the range "lb/le" by "inc". If the line range is omitted, the
entire file will be renumbered. (As in other commands, "ALL" may be used
in place of "lb/le".) If "BY inc" is omitted, the default increment is
used.
Parameter option 2:BOTH [BY inc]
Renumbers both the editor sequence numbers and the RPG source line
numbers (columns 1-5) by "inc". Both will have the same value. The
value of "inc" cannot be less than 1. Using this option you renumber
your entire file.
Parameter option 3: SO[URCE] [BY inc]
Renumbers the RPG Source program line numbers (col. 1-5). If "BY inc"
is omitted, the line numbers are renumbered with the following bracketing
values established for the record specification forms:
H starts at 10
F 6000
E 7000
L 8000
I 10000
C 30000
O 50000
If "BY inc" is specified, the source will be renumbered accordingly.
Again, "inc" cannot be less than 1.
Parameter option 4: SO[URCE] W[ITH] SE[QUENCE]
The RPG source line numbers are renumbered to agree with the work file
sequence numbers.
Parameter option 5: SE[QUENCE] W[ITH] SO[URCE]
The work file sequence numbers are renumbered to agree with the RPG
source line numbers. If each line number in the RPG source program is
not in ascending order, the RENUM command will not renumber the work
file.
Purpose
The RENUM command renumbers sequence line numbers in the work file or
line numbers in the RPG source program (columns 1-5).
Execution mode: Line or Block
Control Y: Stops the listing of lines that are being renumbered;
does not stop the renumbering.
Examples
The following are legal abbreviations which may be used with the RENUMber
command and its parameters:
R ALL Renumber all sequence line numbers in the work file.
R BOTH BY 10 Renumber sequence line numbers and source line numbers
using an increment value of 10.
R SO W SE Renumber source line numbers so that they correspond
with sequence line numbers.
REN SO Renumber source line numbers so that they have
bracketing values according to the record specification
form with which they are associated.
The examples use a truncated version of SIMCAL consisting of the first
five lines. It has been stored in a permanent file with the name
PARTSIM. When an attempt to TEXT the file is made, and the filename is
typed incorrectly, an error message is returned (1). The command is then
given correctly, and the file contents are listed (2). RENUM is entered
along with a parameter calling for an increment value of 100.
When the command has been executed, RISE returns a message (3). After
the LIST command is executed, the renumbered lines are shown on the
screen (4). RENUM BOTH follows, with the BY 1 parameter. Another
listing reveals how both sequence line numbers, and source line numbers
are affected by this command (5).
(1) >TEX PARTSIM2
NONEXISTENT PERMANENT FILE (FSERR 52)
(2) >TEX PARTSIM
Text completed.
>L ALL
1 00011H
SIMCAL
2 00012FINPUT IP F 72 DISK
3 00013FOUTPUT O F 72 DISK
4 00014IINPUT AA 01 1 CA
5 00015I OR 02 1 CS
(3) >RENUM ALL BY 100
Renum completed.
(4) >L ALL
100 00011H
SIMCAL
200 00012FINPUT IP F 72 DISK
300 00013FOUTPUT O F 72 DISK
400 00014IINPUT AA 01 1 CA
500 00015I OR 02 1 CS
>
>RENUM BOTH BY 1
Renum completed.
>L ALL
1 00001H
SIMCAL
2 00002FINPUT IP F 72 DISK
3 00003FOUTPUT O F 72 DISK
4 00004IINPUT AA 01 1 CA
(5) 5 00005I OR 02 1 CS
>
In the next example, a misspelling of SOURCE evokes an error (1). When
the command is entered correctly and listed on the screen, the source
line numbers are seen to be numbered according to the bracketing values
(2). Next, another typing error causes the display of an error message
(3). The command, entered correctly, causes the sequence line numbers to
take on the same numbers as the source line numbers (4). The source line
numbers are then changed by a command which sets their increment value at
10. The results are brought to the screen by a LIST command (5).
An error results from a mistaken parameter following WITH (6), and a
message is displayed. When a command to renumber source lines with
sequence line numbers is correctly entered, and the LIST command is used,
the results are displayed on the screen (7).
(1) >RENUM SOUCE
^
Error 161: Syntax error on SOURCE.
>RENUM SOURCE
Renum completed.
>L FIR/L
1 00010H
SIMCAL
2 06000FINPUT IP F 72 DISK
3 06001FOUTPUT O F 72 DISK
4 10000IINPUT AA 01 1 CA
5 10001I OR 02 1 CS
(2) >
(3) >RENUM SEQNUM WITT SOURCE
^
Error 164: Syntax error on WITH.
>RENUM SEQNUM WITH SOURCE
Renum completed.
>L A
10 00010H
SIMCAL
6000 06000FINPUT IP F 72 DISK
6001 06001FOUTPUT O F 72 DISK
10000 10000IINPUT AA 01 1 CA
10001 10001I OR 02 1 CS
(4) >
>RENUM SOURCE BY .1
Error 153: Increment cannot be less than 1 for source.
>RENUM SOURCE BY 10
Renum completed.
>
(5) >L ALL
10 00010H
SIMCAL
6000 00020FINPUT IP F 72 DISK
6001 00030FOUTPUT O F 72 DISK
10000 00040IINPUT AA 01 1 CA
10001 00050I OR 02 1 CS
>
(6) >R SO W SO
Error 159: Expecting SEQNUM after WITH.
>R SO W SE
Renum completed.
>LIST A
10 00010H
SIMCAL
6000 06000FINPUT IP F 72 DISK
6001 06001FOUTPUT O F 72 DISK
10000 10000IINPUT AA 01 1 CA
(7) 10001 10001I OR 02 1 CS
>
MPE/iX 5.0 Documentation