Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS User's Manual


Previous Contents Index

8.13.6.2 REPLACE Command Responses

The following table shows the responses and their effect to the REPLACE command query:
Response Effect
Yes Replace this occurrence and find the next one. This is the default response. Press the Return key.
No Skip this occurrence and find the next one.
All Replace all occurrences (no further prompting unless EVE finds an occurrence in the opposite direction).
Last Replace this occurrence and stop here.
Quit Skip this occurrence and stop here.

8.14 Using Command Line Qualifiers

When 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.

Table 8-10 EDIT/TPU Command Line Qualifiers
Qualifier Default
Command file /COMMAND=TPU$COMMAND.TPU
File creation /CREATE
Debugging package /NODEBUG
Specifying display mode /DISPLAY=CHARACTER_CELL
Initialization file /INITIALIZATION=EVE$INIT.EVE
Journaling /JOURNAL
Modifying main buffer /MODIFY
Specifying output /OUTPUT=output-file
Read-only access /NOREAD_ONLY
Recovery /NORECOVER
Section files /SECTION=TPU$SECTION
Start position /START_POSITION=(1,1)
Work file /WORK=SYS$SCRATCH:TPU$WORK.TPU$WORK

8.14.1 Starting in an Alternate Position

Start 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:

/START_POSITION=(row[,column] 

The fields are as follows:
/START_POSITION You must use the /START_POSITION= qualifier to the EDIT/TPU command.
row The row that you want the cursor to be at when you invoke EVE.
column The column that you want the cursor to be at when you invoke EVE.

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:


$ EDIT/TPU TEST.COM /START_POSITION=(10,5)

If you want to start at a particular line in a file, you can omit the second parameter (the column).

8.14.2 Using Work Files

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:

If you want the work file to be created in an area other than SYS$SCRATCH, use a complete file specification, including the device (disk) and directory. You cannot use wildcards to specify the work file.

8.14.3 Modifying the Main Buffer

Modifying 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:


$ EDIT/TPU /READ_ONLY /MODIFY

In EVE, you can set or change the modification attribute of the buffer by using SET BUFFER commands.

8.15 Alternate Methods to Invoke EVE

You can invoke EVE using four different methods: from search lists, with wildcards, with wildcard directory names, or with multiple input files.

8.15.1 Invoking EVE from a Search List

You can use a search list to invoke EVE to edit a file from that search list. For example:


$ DEFINE STAFFMEMOS HIRING.DAT,PROMOTION.LIS,SALARY.TXT
$ EDIT/TPU STAFFMEMOS

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.

8.15.2 Invoking EVE with Wildcards

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:


$ EDIT/TPU *.TXT

If you specify *.TXT, two files (LETTER.TXT and MEMO.TXT) match your wildcard request. In this case, EVE gives you a list in a second window in a system buffer named $CHOICES$.

8.15.3 Invoking EVE with Wildcard Directory Names

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:

In the following example, EVE searches through the directory tree and gets the first PINK.TXT file found, if there is one.


$ EDIT/TPU [...]PINK.TXT

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.

8.16 Journaling and Recovery

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.

8.16.1 Using Buffer-Change Journaling

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.

Table 8-11 EVE Commands for Buffer-Change Journaling and Recovery
Command Function or Effect
RECOVER BUFFER Recovers a specified buffer by using the journal file for the buffer. You can specify the name of the buffer or file you want to recover or the name of the journal file for the buffer.
RECOVER BUFFER ALL Recovers all your text buffers, one at a time, by using the journal files for the buffers, if there are any.
SET JOURNALING Enables buffer-change journaling for a buffer that you specify.
SET JOURNALING ALL Enables buffer-change journaling for all your buffers. This is the default setting.
SET NOJOURNALING Disables buffer-change journaling for a buffer that you specify.
SET NOJOURNALING ALL Disables buffer-change journaling for all your buffers.

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:


$ CREATE/DIRECTORY [USER.JOURNAL]
$ DEFINE TPU$JOURNAL [USER.JOURNAL]
You can put the definition in your LOGIN.COM file.

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.

Table 8-12 Buffer-Change Journal File Names
Text Buffer Name Buffer-Change Journal File
JABBER.TXT JABBER_TXT.TPU$JOURNAL
GUMBO_RECIPE.RNO GUMBO_RECIPE_RNO.TPU$JOURNAL
MAIN MAIN.TPU$JOURNAL
LATEST NEWS LATEST_NEWS.TPU$JOURNAL

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.


$ EDIT/TPU JABBER.TXT
              .
              .
              .
   ***  system failure  ***
              .
              .
              .
$ EDIT/TPU JABBER.TXT/RECOVER

Using the RECOVER BUFFER Command

To use the recover buffer command, follow this procedure:
Step Task
1 Invoke EVE and enter the following command to recover your text:
 Command: RECOVER BUFFER
file-name.txt

If the buffer-change journal file is available, EVE shows the following information and asks if you want to recover that buffer:

  • Name of the buffer
  • Original input file for the buffer, if any
  • Output file for the buffer, if any
  • Source file for recovery, if any
  • Starting date and time of the editing session
  • Journal file creation date and time
2 Press the Return key to recover your buffer.

If you do not want to recover your buffer, type No and press the Return key. If you delete or rename the source file for recovery, the recovery fails. The source file is either the file initially read into the buffer (if any) or the last file written before the system failure.

If the buffer you want to recover exists (usually the Main buffer), EVE first deletes that buffer and then does the recovery. If the buffer you want to recover has been modified, EVE asks you whether to delete the buffer before recovering.

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:


Command: RECOVER BUFFER *

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.

How to Recover All Buffers

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:
Response Effect
Yes Recovers the buffer and then asks you whether to recover the next buffer, if there is one. This is the default response. Press the Return key.
No Skips this recovery. If there is another buffer to recover, EVE asks you about the other buffer.
Quit Cancels---does not recover the buffer and does not continue recovery operations.

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:


Command: SET JOURNALING 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:


Command: SET JOURNALING MEMO.TXT
Buffer MEMO.TXT is not safe for journaling
You should first write out (save) the buffer by using the WRITE FILE or SAVE FILE command and then enable journaling.

8.17 EVE Formatting Commands

EVE 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-13 EVE Editing Keys and Their Functions
Key or Key Sequence Function
Return or Ctrl/M Inserts a carriage return at the current position either to start a new line of text or to terminate a command you are typing. On VT200, VT300, and VT400 series terminals, EVE also defines the Enter key as Return.
Tab or Ctrl/I Inserts a tab character at the current position according to the tab modes and at the tab stops currently set.
Ctrl/L Inserts a form-feed character at the current position to mark the beginning of a new page. A page break appears as a small double F (FF ) and is always on a line by itself. Same as INSERT PAGE BREAK.

Table 8-14 shows EVE text formatting commands and describes their functions.

Table 8-14 EVE Text Formatting Commands and Their Functions
Command Function
CAPITALIZE WORD Changes the case of a word, making the first letter uppercase and the rest of the letters lowercase. Works on a range, box, or single word.
CENTER LINE Centers the current line between the left and right margins. The cursor moves with the line, remaining on the same character as the line moves.
CONVERT TABS Converts tab characters to the appropriate number of spaces in a box, a range, or the entire buffer.
FILL Reformats the current paragraph, range, or box according to the margins of the buffer, so the maximum number of words fits on a line. When you fill a select range or found range, the FILL or FILL RANGE command does not reformat a line that begins with a page break, a DIGITAL Standard Runoff (DSR) command, or DOCUMENT tag; it does reformat the other lines in the range. Filling a range does not delete blank lines. For more information about select range, see Section 8.9.
FILL PARAGRAPH Reformats the paragraph that the cursor is in according to the margins set for the buffer. When you fill a paragraph, the FILL command does not reformat a line that begins with a page break, DSR command, or DOCUMENT tag; it does reformat the other lines in the paragraph.
FILL RANGE Reformats the range or box according to the current margin settings. When you fill a select range or found range, the FILL or FILL RANGE command does not reformat a line that begins with a page break, DSR command, or DOCUMENT tag; it does reformat the other lines in the range. Filling a range does not delete blank lines.
INSERT PAGE BREAK Inserts a form-feed character at the current position to mark the beginning of a new page. A page break appears as a small double F (FF ) and is always on a line by itself. By default, Ctrl/L is defined as INSERT PAGE BREAK.
LOWERCASE WORD Changes the current word, range, or box to lowercase.
PAGINATE Inserts a "soft" page break for a 54-line page. A soft page break appears as a form feed followed by the null character (FF NL ). When you enter the PAGINATE command, EVE moves back to the previous page break (if any) then checks ahead for page breaks within the next 54 lines. If any soft breaks are found within those 54 lines, EVE removes them. EVE then moves down 54 lines, inserts a soft break, and puts the cursor on the next line. The soft break is inserted on a line by itself. If a hard page break (form feed only) is found within the 54 lines, EVE stops on the line after the hard break, in case you want to erase the break.
SET LEFT MARGIN Sets the left margin in the current buffer. The left margin must be greater than 0 but less than the right margin. By default, the left margin is 1 (leftmost column).
SET RIGHT MARGIN Sets the right margin for the current buffer. The right margin must be greater than the left margin. By default, the right margin is one less than the width. The width is typically 80, so the default margin is typically 79.
SET PARAGRAPH INDENT Specifies the number of spaces to be added to or subtracted from the first line of paragraphs you create or reformat. The default is 0 (no indent).
SET TABS AT Sets tab stops at the columns that you specify. The column numbers must be in ascending order and separated by spaces. By default, tab stops are set every eight columns. The command does not affect the hardware tab settings of your terminal.
SET TABS EVERY Sets tab stops at the specified interval. By default, tab stops are set every eight columns. The command does not affect the hardware tab settings of your terminal.
SET TABS INSERT Default setting. Changes the tab mode so that EVE inserts a tab character at the current column when you press the Tab key. The cursor and text move to the next tab stop.
SET TABS MOVEMENT Changes the tab mode so the Tab key becomes a cursor-movement key. Pressing the Tab key moves the cursor to the next tab stop but does not insert a tab character.
SET TABS SPACES Changes the tab mode to insert an appropriate number of spaces, rather than a tab character, when the Tab key is pressed. Previously existing tab characters are not affected.
SET TABS INVISIBLE Default setting. Makes tab characters invisible on the screen, appearing as white space.
SET TABS VISIBLE Makes tab characters visible on the screen, appearing as a small HT (horizontal tab).
SET NOWRAP Disables word wrapping at the right margin of the buffer. To start new lines, press the Return key or use the FILL command.
SET WRAP Default setting. Enables word wrapping at the right margin of the buffer. EVE starts new lines without you pressing the Return key or using the FILL command.
UPPERCASE WORD Changes the current word, range, or box to uppercase.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6489PRO_017.HTML