CHANGE /C/C /
adds a blank following the first occurrence of the character "C". ABC XYZ ABC
is the final line. You can use the ALTER subcommand to change a
single character; the ALTER subcommand allows you to specify a
hexadecimal value so that you can include characters in yeur files for
which there are no keyboard equivalents. Once in your file, these
characters appear during editing as nonprintable blanks. For example,
if you input the line:
IF A = B THEN
in edit mode and then issue the subcommand:
alter = Sc the line is displayed:
IF A B THEN
If you subsequently print the file containing this line on a printer
equipped to handle special characters, the line appears as:
IF A B THEN
since X'SC' is the hexadecimal value of the special character Either or both of the operands on the ALTER
hexadecimal or character values. To change the
character, for example <, you could issue either:
alter Sc ae -- or
alter Sc <
subcommand can be X'SC' to another The OVERLAY subcommand allows you to replace
characters in a line by spacing the terminal's typing element or cursor
to a particular character position to make character-for-character
replacements, or overlays. For example, given the line:
ABCDEF
the subcommand:
overlay xyz
results in the line: XYZDEF A blank entered on an OVERLAY line indicates that the corresponding
character is not to be changed; to replace a character with a blank, use
an underscore character (_). Given the above line, XYZDEF, the
subcommand:
overlay 3
results in:
DE3 (The liD" is preceded by blanks in columns 1, 2, and 3.) 70 IBM VM/370 eMS User's Guide
You can make global or repetitive changes with the CHANGE and ALTER
subcommands. On these subcommand lines, you can include operands that
indicate: e The number of lines to be searched for a character or character
string. An asterisk (*) indicates that all lines, from the current
line to the end of the file, are to be searched. e Whether only the first occurrence or all occurrences on each line are
to be modified. An asterisk (*) indicates all occurrences. If you do
not specify an asterisk, only the first occurrence on any line is
changed.
For example, if you are creating a file that uses the (e) special
character (X'AF') and you do not want to use the ALTER subcommand each
time you need to enter the e, you could use the character , as a
substitute each time you need to enter a e. When you are finished
entering input, move the current line pointer to the top of the file,
and issue the global ALTER subcommand:
top#alter , af * *
All occurrences of the character, are changed to X'AF'. line pointer is positioned at the end of the file.
The current When you use a global CHANGE subcommand, you must be sure to use the
final delimiter on the subcommand line. For examFle:
change /hannible/hannibal/ 5
This subcommand changes the first occurrence of the string "HANNIBLE" on
the current line and the four lines immediately following it. You can also make global changes with the OVERLAY subcommand, by
issuing a REPEAT subcommand just prior to the OVERLAY subcommand. Use the REPEAT subcommand to indicate how many lines you want to be
affected. For example, if you are editing a file containing the three
lines: A B
C
with the current line pointer at line "A", issuing the subcommands:
repeat 3
overlay
results in:
A
B
C
The current line pointer is now positioned at the line beginning with
the character "C".
Section 5. The eMS Editor 71
Previous Page Next Page