HP RPG/iX Utilities Reference Manual (30318-90006)
2- 156
Examples
The following are legal abbreviations which may be used with the CHANGE command and its parameters:
CH;OLD;TO $NEW$ Change oldstring TO newstring from first line to current
IN F/* position of record pointer.
CHAN;OLD; TO; Change oldstring to newstring in lines 1 through 10.
NEW;IN1/10
In the examples of the CHANGE command, a mistake is made in the spelling of the command, and an
error message is returned (1).
Next, there is an attempt to replace a three character string, ";PUT;" with a four character string ";FILE;",
and another error message is generated (2).
When an additional space is added between the delimiters containing the oldstring ";PUT ;" so that both
strings are equal in length, the CHANGE is executed (3).
>LIST ALL
1 H
SIMCAL
2 FINPUT IP F 72 DISK
3 FOUTPUT O F 72 DISK
4
5 IINPUT AA 01 1 CA
6 I OR 02 1 CS
7 I OR 03 1 CM
8 I OR 04 1 CD
9 I OR 05
10 I 8 72OPRND1
11 I 9 132OPRND2 99
12
(1) >CHANGE ;PUT; TO ;FILE; IN ALL
^
Error 9: Syntax error on CHANGE command.
(2) >CHANGG ;PUT; TO ;FILE; IN ALL
Error 109: Oldstring length must equal newstring length.
(3) >CHANGE ;PUT ; TO ;FILE; IN ALL
2 FINFILE IP F 72 DISK
3 FOUTFILE O F 72 DISK
4 IINFILE AA 01 1 CA
COMMENT
COMMENT produces a comment banner to contain the comments you enter.