Controlling the Editor
There are a number of EDIT subcommands that you can use to maximize the
use of the editor in CMS. A few techniques are suggested here; as you
become more familiar with VM/370 and CMS you will develop additional
techniques for your own applications. COMMUNICATING WITH CMS AND CP often during a terminal session, you may need to issue a CMS command or
a CP command. You can issue certain CMS commands and most CP commands
without terminating the edit session. The EDIT subcommand CMS places
your virtual machine in the CMS subset mode of the editor, where you can
issue CMS commands that do not modify your virtual storage. Remember
that the editor is using your virtual storage; if you overlay it with
any other command or program, you will not be able to finish your
editing. One occasion when you may want to enter CMS subset is when you want
to issue a GET FILE subcommand for a file on one of your virtual disks
and you have not accessed the disk. You can enter:
cms
The editor responds: CMS SUBSET Then you can enter:
access 193 b/a
return
get setup script b
The special CMS SUBSET command RETURN returns your virtual machine to
edit mode. You can enter CP commands from CMS subset, or you can issue them
directly from edit mode or input mode with the tcp function. For
example, if you are inputting lines into a file and another user sends
you a message, you can reply without leaving input mode:
#cp m oph i will call you later
If you enter tcp without specifying a command line, you receive the
message: CP which indicates that your virtual machine is in the CP command
environment, and you can issue CP commands. You would not, however,
want to issue any CP command that would modify your virtual storage or
alter the status of the disk on which you want to write the file.
To return to edit or input mode from CP, use the CP command, BEGIN.
If you are working at a display terminal and the screen image does not
reappear, enter the TYPE command to cause the editor to redisplay the
screen.
84 IBM VM/370 CMS User's Guide
March 30, 1979
CHANGING FILE IDENTIFIERS
There are several methods you can use to change a file identifier before
writing the file onto disk. You can use the FNAME and FMODE subcommands
to change the filename or filemode, or you can issue a FILE or SAVE subcommand specifying a new file identifier.
For example, if you want to create several cOFies of a file while you
are using the editor, you can issue a series of FNAME subcommands,
followed by SAVE subcommands, as follows:
edit test file
EDIT:
fn test11save fn test21save fn test3tfile Or, you could issue the SAVE and FILE subcommands as follows:
edit test file
save test1
save test2
file test3
In both of the preceding examples, when the FILE subcommand is executed. there are files named TEST FILE, TEST1 FILE, TESi2 FILE, and TEST3 FILE.
The original TEST FILE is unchanged.
To change the filemode letter of a disk, use the FMODE subcommand. yOU can do this in cases where you have begun editing a file that is on
a read-only disk, and want to write it. Since you cannot write a file
onto a read-only disk, you can issue the FMODE subcommand to change the
mode before filing it:
fmode a
file
or, you can use the FILE (or SAVE) subcommand specifying a complete file
identifier:
file test file a You should remember, however, that when you write a file onto disk,
it replaces any existing file that has the same identifier. The editor
does not issue any warning or informational messages. If you are
changing a file identifier while you are editing the file, you must be
Section 5. The eMS Editor 85
Previous Page Next Page