Download Print this page

HP 3000 Manual page 187

Mpe/ix computer systems, rpg/xl utilities
Hide thumbs Also See for 3000:

Advertisement

M
Modify line at the current position of the record pointer.
MOD AL^^
Modify all the lines and display the corresponding RPG Record Specification form.
The first five lines of SIMCAL are used for these examples. After the lines are listed, MODIFY FIRST is
entered, and a two-character string is replaced using the R subcommand (1). Note that the line selected
for modification is displayed unmodified on the screen initially, and that it is displayed again after the
execution of the subcommand. An effort to use an illegal parameter with MODIFY evokes an error, and
the suitable message is displayed (2).
Line 2 is singled out for a number of modifications. Initially, the word INPUT is deleted. Note that the D's
are placed directly beneath the first and last characters of the string INPUT, and that this is sufficient to
delete the complete word (3). <Control Y> is used to demonstrate a method of restoring an erroneous
deletion (4).
>L 1/5
1
SIMCAL
2
3
4
5
(1)
>MOD FIRST
1
SIMCAL
1
SIMCAL
(2)
>M SECOND
^
Error 61: Only a '*',line number,FIRST,LAST,ALL allowed in range.
(3)
>M 2
2
(4)
2
In the next example, the delete subcommand removes a three-character string from the word INPUT (1).
Note that the remainder of the line moves left a corresponding number of spaces (2). Thus, the syntax of
an RPG source program will be affected by modifications which remove characters or insert characters into
records. Next, the string removed by the delete subcommand is replaced by a three character insertion (3).
The replace (R) subcommand is used next (4). Though two more characters are added to the line, they
replace blank spaces, and the syntax of the line is not changed. Replace (R) is used again on the next line
(5). And the word DISK is replaced by TAPE in the line following, although the subcommand is not used.
This is an example of an undesignated subcommand (6).
(1)
2
:
(2)
2
(3)
:
(4)
2
:
(5)
2
:
00011H
00012FINPUT
00013FOUTPUT
00014IINPUT
000151
OR
00011H
:
R10
00010H
:
00012FINPUT
IP
:
D
D
00012F
IP
F
:<Control Y>
Restore Record.
00012FINPUT
IP
D D
00012FIN
IP F
IFIL
00012FINFIL
IP
RES
00012FINFILES
IP
IP
F
72
O
F
72
AA
01
1
CA
02
1
CS
F
72
72
F
72
72
F
72
F
72
R80
DISK
DISK
DISK
DISK
DISK
DISK
DISK
DISK
2- 189

Advertisement

loading