Note: You must type a separator between the command
name (LOCATE) and your data.
In
the example above, a
slash
(I)
is the separator.
If
the data
to
be
located contains
a slash, like
VM/PC
or
01/23/84,
you must use a different
special character as a separator.
For
example,
LOCATE$VM/PC
or
LOCATE%01/23/84.
The
following special characters cannot be used as separators:
...,
(not), + (plus), - (minus),
or
. (period).
The
LOCATE
command tells the editor to look through the
file, starting with the line following the current line, until it
finds
"your data."
You can change the located data using this
CHANGE
command:
Change/oldword/newword/
This form
of
the
CHANGE
command changes the first
occurrence
of
the old word
in
the current line. This
is
why
you used the
LOCATE
command. When the editor locates
the data, it makes the line that contains it the new current
line.
Changing a Word Throughout a File: To change data
throughout a file, use this form of the
CHANGE
command:
===>
c/olddata/newdatal
* *
The message x OCCURRENCE(S)
CHANGED
ON
x
LINE(S) tells you how many words were changed. The
editor searched every line
of
the file, from
the
current line to
the last, and changed "olddata" to
"newdata." Note the
format of this command.
You must type a slash
(I)
after the
new word (newdata), and you must type two asterisks
with
a
space between them
(* *). The first asterisk tells the editor
to
search every line of the file. The second tells it to change
every occurrence of the old word in each line.
After a
CHANGE
command, the last line searched becomes
the new current line.
Note: Remember that the change starts with the current
line.
If
you enter this kind
of
command when the current
5-20
VM/PC
Users Guide