![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS User's Manual
8.13.6.2 REPLACE Command ResponsesThe following table shows the responses and their effect to the REPLACE command query:
8.14 Using Command Line QualifiersWhen you invoke EVE, you can use command line qualifiers to specify advanced EVE editing features. When using the character-cell screen updater, the default insert or overstrike mode is determined by your terminal setting. Table 8-10 lists the qualifiers that you can use with the EDIT/TPU command to invoke EVE.
8.14.1 Starting in an Alternate PositionStart position qualifiers determine the row and column where the cursor first appears in the buffer that you specified on the command line. For EVE, the default start position is 1,1---row 1, column 1, which is the upper left corner of the buffer. Use of start position qualifiers does not affect the initial cursor position when you create another buffer during the editing session and does not limit the buffer size. The format of the start position qualifier is as follows:
The fields are as follows:
Use the start position qualifier to begin editing at a particular line (or row) or at a particular character position (or column). For example, when you want to skip over a standard heading in a file or if a batch log file or error message tells you there is an error on a given line of a program, you can specify that line number as the starting row so that when you edit the program source file, the cursor moves directly to that line. The following command edits a file named test.com and puts the cursor on line 10, column 5:
If you want to start at a particular line in a file, you can omit the
second parameter (the column).
Work file qualifiers determine the work file that is used to swap memory for editing very large files. There is one work file per editing session. The work file is a temporary file that is automatically deleted when you exit. The default work file is named TPU$WORK.TPU$WORK. EVE creates the work file in SYS$SCRATCH unless you specify otherwise. There are two ways to specify a different work file:
8.14.3 Modifying the Main BufferModifying qualifiers determine whether you can modify the buffers specified on the command line. Modifications do not affect other buffers you create during the editing session. By default, you can modify the buffer by editing text in it. When you exit, EVE writes out the buffer to a file if the buffer has been modified. Use /NOMODIFY to examine a file without making any changes. You can then use cursor-movement commands but you cannot change the text. If you specify neither /MODIFY nor /NOMODIFY, your application determines if you can modify the buffer. EVE's default behavior is to modify the buffer. Use /MODIFY to override the effect of /READ_ONLY or /NOWRITE. Use /MODIFY with /READ_ONLY or /NOWRITE to practice editing operations without writing a file on exiting. For example, the following command invokes EVE, making the buffer you specified on the command line read-only (or no-write) and making it modifiable:
In EVE, you can set or change the modification attribute of the buffer
by using SET BUFFER commands.
You can invoke EVE using four different methods: from search lists,
with wildcards, with wildcard directory names, or with multiple input
files.
You can use a search list to invoke EVE to edit a file from that search list. For example:
In the example, if the first file in the search list exists, EVE copies
that file (HIRING.DAT) into a buffer and uses the file name and file
type as the buffer name. If the file does not exist, EVE tries to get
the second file (PROMOTION.LIS), and so on. If none of the files in the
search list exist, EVE creates an empty buffer named HIRING.DAT because
that is the first file in the search list.
When you invoke EVE to edit an existing file, you can use the asterisk (*) wildcard character as a substitute for some or all of the characters in the file name and file type. To use wildcards in EVE, follow the same rules as using wildcards in DCL. You can use the percent sign (%) wildcard character as a substitute for a single character at a time, and you can use the ellipsis ([...]) wildcard character as a substitute for a directory specification. If only one match is made, the file is displayed on your screen. If more than one match is made, EVE displays a list of matching files and prompts you to provide a more complete file specification. If no match is made, EVE creates a buffer named Main. If more than one file matches your wildcard request, EVE displays the matching files so you can choose the one you want. If no matching file is found, EVE creates an empty buffer named Main. If you use a search list or wildcard directory to specify an input file, EVE gets the first matching file found without displaying the $CHOICES$ buffer. For information about using the $CHOICES$ buffer, see the EVE online help topic called Choices Buffer. In the following example, a list of all files with the file type .TXT will be displayed:
If you specify *.TXT, EVE lists the files that match your wildcard
request in a second window in a system buffer named $CHOICES$.
You can use wildcards in a directory name ([...]) to invoke EVE and work either in your current directory or in a subdirectory of the current directory. This way of handling a search list or wildcard directory applies not only to the EDIT/TPU command, but also to EVE commands that use a file specification as a parameter. The following EVE commands use a file specification as a parameter: @ (at sign) In the following example, EVE searches through the directory tree and gets the first PINK.TXT file found, if there is one.
8.15.4 Invoking EVE with Multiple Input Files
You can specify multiple input files on the command line that invokes
EVE. The file names must be separated by commas with optional white
space. If wildcard characters are present in the file names, EVE
displays the matching files only for the first wildcard file name that
has more than one match. For the other ambiguous file names, EVE
outputs a warning message.
Journal files record your edits so that if a system failure interrupts your editing session, you can recover your work. Buffer-change journaling creates a separate journal file for each text buffer you create. This is the EVE default. Buffer-change journaling works both on DECwindows and on character-cell terminals. You recover one buffer at a time, typically by using RECOVER BUFFER commands in EVE. You can recover buffers from different editing sessions. The recovery restores only your text---it does not restore settings, key definitions, or the contents of system buffers (such as the Insert Here buffer) before the system failure. You can disable journaling when you invoke EVE by using the /NOJOURNAL qualifier on your command line. This is useful when you use EVE to examine a file without making any edits or for demonstration sessions.
EVE file backups are disabled and cannot be enabled because the OpenVMS
file system provides version numbers; therefore, no EVE mechanism is
needed.
Buffer-change journaling creates a journal file for each text buffer. (EVE does not create buffer-change journal files for system buffers such as the Insert Here buffer, DCL buffer, or $RESTORE$ buffer.) As you edit a buffer, the journal file records the changes you make, such as erasing, inserting, or reformatting text. When you exit from EVE or when you delete the buffer, the journal files are deleted. If a system failure interrupts your editing session, the journal files are saved. Your last few keystrokes before the system failure may be lost. Table 8-11 summarizes the EVE commands for buffer-change journaling and recovery.
Buffer-change journal files are written in a directory defined by the logical name TPU$JOURNAL. By default, this directory is SYS$SCRATCH, which is typically your top-level (login) directory. You can redefine the TPU$JOURNAL logical name to have the journal files written to a different directory. For example, the following commands create a subdirectory called [USER.JOURNAL] and then define TPU$JOURNAL as this subdirectory:
Buffer-change journal files may be quite large (even larger than the text files you edit). Because of the potential size of buffer-change journal files and because there is a journal file for each text buffer, you may want to define TPU$JOURNAL as a directory or subdirectory on a large disk, rather than as SYS$SCRATCH.
Deriving Buffer-Change Journal Names
Buffer-change journal file names are derived from the name of the file or buffer being edited and the default file type for the operating system. To find out the name of the journal file for the current buffer, enter the SHOW command at the EVE prompt. The SHOW command displays the name of your input file, output file, your journal file, and other information about your current buffer. Table 8-12 shows the buffer-change journal file names.
Using Buffer-Change Journaling to Recover Edits
There are two ways to recover your edits with buffer-change journal files:
In the following example, you are editing a file named JABBER.TXT when a system failure interrupts your editing session. You then use system recovery to recover your edits.
Using the RECOVER BUFFER Command
To use the recover buffer command, follow this procedure:
How to Recover When You Are Unsure of the File Name
If you are unsure of the buffer names or journal file names, specify the asterisk (*) wildcard, as follows:
EVE then displays a list of all your available journal files so you can choose the one you want. The list appears in an EVE system buffer named $CHOICES$ in a second window. For information about using the $CHOICES$ buffer, see the EVE online help topic called Choices Buffer. To recover all your text buffers---one at a time---use the RECOVER BUFFER ALL command. EVE then tries to recover each text buffer for which there is a buffer-change journal available. The effect is the same as repeating the RECOVER BUFFER command without having to specify buffer names or journal file names. For each text buffer, EVE displays information such as the buffer name, the files associated with the buffer, and the time and date the journal file was created. EVE prompts you for one of the following:
Disabling Buffer-Change Journaling
You can disable buffer-change journaling for a particular buffer by using the SET NOJOURNALING command. To disable buffer-change journaling for all your buffers, use the SET NOJOURNALING ALL command.
Enabling Buffer-Change Journaling
If you disabled buffer-change journaling, you can enable journaling by using the SET JOURNALING command. The following command enables journaling for a buffer named JABBER.TXT:
If you invoked EVE without journaling and then want to enable buffer-change journaling during the editing session, use the SET JOURNALING ALL command (which is the EVE default). You cannot enable buffer-change journaling if the buffer has been modified. In such a case, EVE displays the following message:
8.17 EVE Formatting CommandsEVE provides commands that let you format your text by setting margins, tabs, and word wrap. You can center lines, take extra white space out of text, and insert page breaks. Table 8-13 shows EVE editing keys and describes their functions.
Table 8-14 shows EVE text formatting commands and describes their functions.
|