Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

Extensible Versatile Editor Reference Manual


Previous Contents Index

A.7 Disabling Journaling

Use the following syntax for the journaling qualifiers:


$ EDIT/TPU /JOURNAL[=journal-file] (default)
$ EDIT/TPU /NOJOURNAL

To disable journaling use /NOJOURNAL, which disables both keystroke journaling and buffer-change journaling. Using /NOJOURNAL makes startup faster but you risk losing your work if there is a system failure during the editing session. If you invoke EVE with /NOJOURNAL, you can enable buffer-change journaling by using SET JOURNALING commands during your editing session.

For more information about journaling and recovery, see the DEC Text Processing Utility Reference Manual.

A.8 Modifying the Main Buffer

Modyifing qualifiers determines 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 the following syntax for the modify qualifiers:


$ EDIT/TPU /MODIFY (default)
$ EDIT/TPU /NOMODIFY

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.

A.9 Determining the Output File Specification

You can use the output file qualifiers to:

Using these qualifiers also determines whether EVE writes out the buffer specified on the command line when you exit. This does not affect other buffers you create during the editing session.

You cannot use wildcards to specify the output file. If you omit parts of the output file specification, DECTPU uses the corresponding parts of the input file specification if there is one.

With EVE, using the /NOOUTPUT qualifier also sets the buffer specified on the command line to read-only. When you do this, exiting from EVE does not write that buffer to a file. This is useful to examine a file without making any changes. If you change your mind and want to save your edits, you can write out the buffer before exiting by using the WRITE FILE command. Also, you can set or change the read/write status of the buffer by using SET BUFFER commands during your editing session.

Use the following syntax for the output qualifiers:


$ EDIT/TPT /OUTPUT[=output-file] (default)
$ EDIT/TPU /NOOUTPUT

By default the output file has the same specifications as the input file with a version number one higher than the highest version of the input file. If you are creating a new file, it is Version 1.

For example, the following command edits a file named ROUGH.LIS in your current directory and writes the output file to FINAL.TXT in your top-level login directory:


$ EDIT/TPU ROUGH.LIS /OUTPUT=SYS$LOGIN:FINAL.TXT

A.10 Read-Only Access

Specifying read-only access determines the read/write status of the buffer specified on the command line---that is, whether you can modify the text and whether exiting creates an output file from that buffer. This does not affect other buffers you create during the editing session.

In EVE, the status line indicates that the buffer is read-only or write. Also, you can set or change the read/write and modification attributes of the buffer by using SET BUFFER commands.

Use the following syntax for the read and write qualifiers:


$ EDIT/TPU /READ_ONLY
$ EDIT/TPU /NOREAD_ONLY (default)
$ EDIT/TPU /WRITE (default)
$ EDIT/TPU /NOWRITE

The /READ_ONLY qualifier is the same as the /NOWRITE qualifier. The buffer specified on the command line is set to no-write (sometimes called write-locked) and also to unmodifiable, unless you also use /MODIFY. Use /READ_ONLY to examine a file without making any edits. For example, the following command invokes DECTPU to view a file named STAFFMEMO.TXT, setting the buffer to read-only and unmodifiable so you can use cursor-movement commands but cannot change the text:


$ EDIT/TPU STATFFMEMO.TXT /READ_ONLY

The /NOREAD_ONLY qualifier is the same as /WRITE. On exiting, EVE writes out the buffer specified on the command line to a file if the buffer has been modified. If necessary, EVE prompts you for the output file name.

A.11 Recovery

Use of recover qualifiers determines whether DECTPU recovers your edits after a system failure by reading the journal file from the interrupted session.

Use the following syntax for the recover qualifiers:


$ EDIT/TPU /RECOVER
$ EDIT/TPU /NORECOVER (default)

There are two methods of recovering your edits, depending on whether you use buffer-change journaling or keystroke journaling.

These methods are described in the sections that follow.

A.11.1 Recovering with Buffer-Change Journaling

If you use buffer-change journaling (which is the EVE default) you recover one buffer at a time and can recover buffers from different editing sessions. For example, the following command invokes EVE to recover the text of a file named JABBER.TXT:


$ EDIT/TPU JABBER.TXT /RECOVER

This is the same as invoking EVE and using the RECOVER BUFFER command, as follows:


Command: RECOVER BUFFER JABBER.TXT
Recovery with a buffer-change journal file restores only your text; it does not restore settings, key definitions, and other customizations and it does not restore the contents of the INSERT HERE buffer or other system buffers. The recovery is usually quite fast.

A.11.2 Recovering with Keystroke Journaling

If you use keystroke journaling, you recover your editing session by reissuing the command for the original, aborted editing session, including all qualifiers, and adding the /RECOVER qualifier.

For example, the following command uses a keystroke journal file named MYSESSION to recover your edits:


$ EDIT/TPU/JOURNAL=MYSESSION
        .
        .
        .
***  system failure  ***
$ EDIT/TPU /JOURNAL=MYSESSION /RECOVER

EVE then recovers your editing session stroke-by-stroke. After the recovery, exit from the file if you want to save the recovered text.

A.11.3 Keystroke Journaling Restrictions

Keystroke journaling does not work on DECwindows and has the following restrictions regarding recovery. These restrictions do not apply to buffer-change journaling. Because of these restrictions, Compaq recommends the use of buffer-change journaling.

For more information about journaling and recovery, see DEC Text Processing Utility Reference Manual.

A.12 Section Files

You can specify the section file you want to use, if any. A section file contains, in binary form, key definitions, compiled procedures, global variables, and so on. Effectively, the section file is the DECTPU application you run---whether a customized version of EVE or some other application you have created.

A.12.1 Specifying a Section File

Use the following syntax for the section file qualifiers:


$ EDIT/TPU /SECTION[=section-file]
$ EDIT/TPU /NOSECTION

The default section file is defined system-wide by the logical name TPU$SECTION. This specifies the standard EVE section file (EVE$SECTION.TPU$SECTION).

There are two ways to specify the section file you want to use:

DECTPU assumes the section file is in SYS$SHARE. If your section file is stored elsewhere, use a complete file specification, including the device (disk) and directory. You cannot use wildcards to specify the section file. You use one section file at a time.

A.12.2 Specifying No Section File

If you use the /NOSECTION qualifier, DECTPU does not use any section file. This prevents even the default interface from being used. DECTPU is virtually unusable unless you specify a command file with procedures and executable statements that set up a text-processing environment. Use /NOSECTION when you create your own application without using EVE as a base or when you use /NODISPLAY for batch editing. For example, the following command uses a command file named USER_APPL.TPU to invoke DECTPU without a section file:


$ EDIT/TPU /NOSECTION /COMMAND=USER_APPL

At startup, a section file, if one is being used, is loaded first---that is, before DECTPU executes a command file (if any) and before EVE executes an initialization file (if any). Thus, your procedures, settings, and key definitions in a command file or initialization file override those in the section file.

A.12.3 Creating a Section File

To create a section file, do either of the following:

A section file is cumulative; it saves the current key definitions and other customizations---and those already in the section file you are using. In EVE, the section file saves the following:

Compiled procedures
Global settings (attributes)
Key definitions and LEARN sequences
Menu definitions for the DECwindows interface

For more information about creating section files, see the DEC Text Processing Utility Reference Manual.

A.13 Start Position

Start position qualifiers determine the row and column where the cursor first appears in the buffer that you specify 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 do not affect the initial cursor position when you create another buffer during the editing session and does not limit the buffer size.

Use the following syntax for the start position qualifier:


$ EDIT/TPU /START_POSITION=(row[,column])

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. Then 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 just want to start at a particular line in a file, you can omit the second parameter (the column).

A.14 Work File

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.

Use the following syntax for the work file qualifiers:


$ EDIT/TPU /WORK[=work-file]
$ EDIT/TPU /NOWORK

The default work file is named TPU$WORK.TPU$WORK. DECTPU 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.


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  
6021PRO_017.HTML