MODIFY [ EDIT/3000:Reference Manual ] MPE/iX 5.0 Documentation
EDIT/3000:Reference Manual
MODIFY
3-74. MODIFY COMMAND
3-75. Purpose.
The MODIFY command modifies text records in the WORK file through the use
of three MODIFY subcommands.
3-76. Form.
The form of the MODIFY command is
M[ODIFY][Q][rangelist]
3-77. Description.
The three MODIFY subcommands are as follows:
D Deletes the character directly above it. A consecutive
string of characters can be deleted by typing a D below
each character or below the first and last characters in
the string (with blank characters in between) to be
deleted.
I Inserts characters in front of the character directly
above the I.
R Replaces characters starting with the character directly
above the R.
In an interactive session, the MODIFY command begins operation for each
line in rangelist by displaying
MODIFY linenumber
then the contents of the line.
If rangelist is not included in a MODIFY command, or if * is specified in
rangelist, EDIT/3000 modifies the line containing the current location of
the pointer.
After one of the subcommands has been used to modify the line and RETURN
has been pressed, EDIT/3000 displays the line again in its modified form
unless the MODIFYQ form of the command has been used, in which case the
modified line is not displayed. If the line is satisfactory, press
RETURN and EDIT/3000 will print the next line to be modified (or
terminate the MODIFY command if the last line in rangelist has been
modified). If the line requires further modification, enter the
appropriate subcommand.
In an interactive session, to cancel the effect of a MODIFY subcommand,
press CONTROL Y before RETURN. To cancel a MODIFY command for all lines
of a range not yet modified, press CONTROL Y after EDIT/3000 displays the
line to be modified. EDIT/3000 then proceeds to the next range (if any)
in rangelist or terminates the MODIFY command if this was the last (or
only) range in rangelist. Lines already modified remain modified and all
other lines remain unchanged.
3-78. Limitations.
The MODIFY command operates only on text within the SET LEFT, SET RIGHT
options in effect. (See paragraph 3-92 for a discussion of the SET
command.)
Only one subcommand may be used to modify a line each time it is
displayed, with this exception: an I (insert) subcommand can follow a D
(delete) or an I can be used as the second D in a range of Ds.
For example,
/MODIFY 1
MODIFY 1
THIS IS LINE 1
DDDDIITEM
THIS IS ITEM 1
D ILINE
THIS IS LINE 1
As you recall, if the ampersand (&;) is used as the last character in a
line, EDIT/3000 interprets this as meaning that the line is to be
continued. Thus, when an ampersand is to be entered as the last
character in a line to be modified with a REPLACE or INSERT subcommand,
you must enter a blank character after the ampersand.
3-79. Examples.
Several variations of the MODIFY command are shown in the following
examples.
* DELETE SUBCOMMAND
The DELETE (D) subcommand causes any character above the D (or a string
of Ds or two Ds with blank characters between) to be deleted. In the
example, the blank character between "HP" and "3000" is deleted by moving
the cursor under the blank character and typing D, then the entire string
"HP 3000" is deleted by the D, a string of blanks, and another D.
/LIST ALL
1 1-2. WHAT IS EDIT/3000?
2
3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM
5 (MPE/3000) THAT IS USED TO CREATE AND
6 MANIPULATE ASCII FILES.
7
8 CHARACTERS, STRINGS OF CHARACTERS, OR ENTIRE
9 LINES OF CHARACTERS CAN BE INSERTED, DELETED
10 REPLACED, MODIFIED, SEARCHED FOR, AND OTHERWISE
11 MANIPULATED BY USING EDIT/3000 COMMANDS.
/MODIFY 3
MODIFY 3
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
D
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
/FIND*
4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM
^ (1 )
/MODIFY 3
MODIFY 3
EDIT/3000 IS A SUBSYSTEM OF THE HP3000
D D
EDIT/3000 IS A SUBSYSTEM OF THE
/LIST 3/4
3 EDIT/3000 IS A SUBSYSTEM OF THE
4 MULTIPROGRAMMING EXECUTIVE OPERATING SYSTEM
* REPLACE AND INSERT SUBCOMMANDS
The REPLACE (R) subcommand replaces characters starting with the
character directly above the R with new characters entered from the INPUT
file. In the example, the characters "HP3000" are replaced by
"HEWLETT-PACKARD" . The INSERT subcommand (1) is used to insert the
characters "3000" after "HEWLETT-PACKARD" . The I is positioned directly
under the character where the inserted information is to begin.
/MODIFY 3
MODIFY 3
EDIT/3000 IS SUBSYSTEM OF THE HP3000
RHEWLETT-PACKARD
EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD
I3000
EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000
NOTE The R subcommand can be used to extend line length by entering R, a
series of blank characters, then RETURN.
* DELETE AND INSERT SUBCOMMANDS
The DELETE (D) and INSERT (I) subcommands can be used on the same line.
The I can be used to insert characters after a D (or a range of Ds), or
the I can be used as the last D in a range of Ds. after the I will be
inserted in the line after the last deleted character.
In the example, the characters "HEWLETT-PACKARD" are deleted by the range
of Ds and the characters "HP" then are inserted with the I subcommand.
/MODIFY 3
MODIFY 3
EDIT/3000 IS A SUBSYSTEM OF THE HEWLETT-PACKARD 3000
D DIHP
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
* USE OF AMPERSAND (&)
In the following example, an & is inserted as the last character and
RETURN is pressed. EDIT/3000 interprets this as a continuation character
and the command LIST 3 is added to the end of line 3.
The second part of the example deletes the characters "LIST 3" and
inserts an & and a blank character. Now EDIT/3000 interprets the
modification correctly.
/MODIFY 3
MODIFY 3
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000
I&
LIST 3
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 LIST 3
/MODIFY 3
MODIFY 3
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 LIST 3
D DI& CR
EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 &
/LIST 3
3 EDIT/3000 IS A SUBSYSTEM OF THE HP 3000 &
MPE/iX 5.0 Documentation