Document revision date: 30 March 2001

## Extensible Versatile Editor Reference Manual

Previous | Contents | Index

## WHAT LINE

### Format

> WHAT LINE

### Description

> The WHAT LINE command shows the current line number, total number of lines in the buffer, and percentage of that position in the buffer. WHAT LINE is useful if you want to know whether to insert a page break or to find out how many lines are in the buffer. The output from WHAT LINE appears in the message window at the bottom of the EVE screen layout.

> To go to a particular line by number, use the LINE command.

#### Related Commands

> LINE
> MOVE BY LINE
> SHOW

### Example

> The following example shows the output from the WHAT LINE command:

    Command: WHAT LINE
    You are on line 35 of 45 (78%).

## WILDCARD FIND

### Key

EVE Default: | GOLD-Find

### Format

> WILDCARD FIND search-pattern

### Parameter

> #### search-pattern

> The pattern of text you want to find, when the command uses wildcards, literal text, or both. WILDCARD FIND follows the same rules as the FIND command for case sensitivity and white space, unless specified otherwise by a wildcard. If you do not specify a string, EVE prompts for one. Pressing the Return key or the Do key at the prompt without typing anything cancels the operation.

> You may not find some search patterns for the following reasons:

> - They are too large
> - Because of the combination of wildcards used
> - The search pattern involves ranges of characters

### Description

> The WILDCARD FIND command uses wildcard, literal text, or both, to search for a pattern of text. The default is SET WILDCARD VMS. WILDCARD FIND follows the same rules for direction as FIND. If the string is found, EVE puts the cursor at the beginning of the string and highlights the found text. You can edit the found text by using any command or key that works on a range or box, for example, BOX CUT, COPY, FILL, REMOVE, or UPPERCASE WORD (see Table 2-5). If SET BOX SELECT is in effect, the editing operation uses the start and end of the found range as diagonally opposite corners of a box. To cancel the highlighting, move the cursor off the found range or use the RESET command.

> To find another occurrence of the same string, use the FIND NEXT command or press the Find key twice.

> Note GOLD-Find is a "sleeper" key, meaning that EVE defines this key sequence but does not define a default GOLD key. The definition is enabled when you use the SET GOLD KEY, SET KEYPAD EDT, or SET KEYPAD WPS command, unless you have otherwise defined it yourself.

#### Related Commands

> CHANGE DIRECTION
> FIND NEXT
> RESET
> SET FIND CASE EXACT
> SET FIND WHITESPACE
> SET WILDCARD VMS
> SHOW WILDCARDS

### Examples

> To search for B or b followed by any single character and a T or t on the same line, use the following command:

#1
    Command: WILDCARD FIND b%t

> To search for B or b followed by any number of characters and a T or t on the same line, use the following command:

#2
    Command: WILDCARD FIND b*t

## WRITE FILE

### Key

WPS Keypad: | GOLD-W

### Format

> WRITE FILE [output-filespec]

### Parameter

> #### output-filespec

> The output file you want to create for saving the contents of the current buffer. If you do not specify a file, EVE uses the file associated with the buffer. If there is no file associated with the buffer, EVE prompts you to type a file name. In such a case, pressing the Return key or the Do key at the prompt without specifying a file cancels the operation.

### Description

> The WRITE FILE command writes out the current buffer to the file you specify or to the output file associated with the buffer.

> If you do not specify a file on the command line, WRITE FILE uses the output file associated with the buffer---same as with the SAVE FILE command. This is the same as the file specified when you invoked EVE or when you used the GET FILE, OPEN, or OPEN SELECTED command. For example, the following commands let you edit the file called MEMO.TXT and then write out your edits as a new version of that file:

>     Command: GET FILE MEMO.TXT
>     38 lines read from file DISK$1:[USER]MEMO.TXT;1
>                .
>                .
>                .
>     Command: WRITE FILE
>     45 lines written to DISK$1:[USER]MEMO.TXT;2

> If there is no file associated with the buffer, WRITE FILE prompts you to type a file name. The following are cases when there is no file associated with the buffer:

> - If you invoked EVE without specifying a file
> - If you created the buffer with the BUFFER or NEW command
> - If you are writing out an EVE system buffer

> You can specify a file on the command line to write the buffer to that file instead of whatever file is associated with the buffer---same as with the SAVE FILE AS command. You can save your edits under a different file name instead of producing a new version of the file you are editing. For example, the following commands let you edit a file called ROUGH.DAT and then write out your edits as a file called FINAL.DAT, rather than as a new version of ROUGH.DAT:

>     Command: GET FILE ROUGH.DAT
>                .
>                .
>                .
>     Command: WRITE FILE FINAL.TXT
>     71 lines written to DISK$1:[USER]FINAL.TXT;1

> Specifying an output file does not change the buffer name but does associate that file with the buffer for later SAVE FILE or WRITE FILE commands or for exiting (except with system buffers). If you specify only the device and directory, EVE uses the same file name and file type associated with the buffer to write the output file to that device or directory.

> To check the output file specification of the buffer, use the SHOW command.

#### Related Commands

> DELETE BUFFER
> EXIT
> QUIT
> SAVE FILE
> SAVE FILE AS

## Appendix A
Using Command Line Qualifiers

This appendix describes qualifiers that you can use to invoke EVE. EVE processes some of the qualifiers differently from other DECTPU applications. For information about how other DECTPU applications use these qualifiers, see the DEC Text Processing Utility Reference Manual.

Table A-1 lists the OpenVMS qualifiers that you can use with the EDIT/TPU command to invoke EVE.

Table A-1 EDIT/TPU Command Line Qualifiers
Qualifier | OpenVMS 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

Using the character cell screen updater, the default insert or overstrike mode is determined by your terminal setting.

## A.1 Command File

Command file qualifiers determine the command file that DECTPU compiles and executes. Command files contain procedures and statements to extend or modify the editor. For example, you can use a command file to create additional EVE commands, define keys, or set attributes. You can also use a command file to set up a special text-processing environment for creating your own DECTPU application or for batch editing.

You cannot use wildcards to specify the command file. You can specify only one command file at a time.

If the command file you specify is not found, the editing session is aborted, returning you to the system prompt. If you do not explicitly specify a file, DECTPU looks for a command procedure but does not exit if no command procedure is found.

At startup, DECTPU compiles and executes a command file after loading a section file (if any) and before EVE executes an initialization file (if any). Thus, procedures, settings, and key definitions in a command file override those in the section file.

Use the following syntax for the command qualifiers:

    $ EDIT/TPU /COMMAND[=command-file] (default)
    $ EDIT/TPU /NOCOMMAND

There are three ways to specify the command file you want to use:

- Name the command file TPU$COMMAND.TPU. By default, DECTPU looks for this command file in your current directory. Thus, you can have a different TPU$COMMAND.TPU file for each directory.
- Define the logical name TPU$COMMAND to specify the command file. For example, the following commands define TPU$COMMAND as MYPROCS.TPU in your top-level login directory and then invoke the editor by using that command file:

      $  DEFINE TPU$COMMAND SYS$LOGIN:MYPROCS
      $  EDIT/TPU

  This is useful if there is a command file you want to use for all or most editing sessions---including when you invoke DECTPU within MAIL---and it lets you keep that command file in any convenient directory. Defining the logical name overrides the default search for the TPU$COMMAND.TPU file. You can put the definition in your LOGIN.COM file.
- Use the /COMMAND= qualifier and specify the command file. This overrides any definition of the logical name TPU$COMMAND and overrides the default search for the TPU$COMMAND.TPU file. For example, the following command uses a command file named MYPROCS.TPU in your current directory to invoke DECTPU:

      $ EDIT/TPU /COMMAND=MYPROCS

  Use /NOCOMMAND if you have defined the logical name TPU$COMMAND or created a TPU$COMMAND.TPU file and do not want the command file executed for a particular editing session. Also, using /NOCOMMAND makes startup faster because DECTPU does not search for a TPU$COMMAND.TPU file and does not have to compile and execute code at startup.

For more information about DECTPU command files, see the DEC Text Processing Utility Reference Manual.

## A.2 File Creation

File creation qualifiers determine whether DECTPU creates a buffer when it does not find the input file. The processing results of using these qualifiers depends on the DECTPU application you are using.

In EVE, files are created by default. If the input file does not exist, EVE uses the input file name and file type to create the buffer name. If you do not specify an input file, EVE creates a buffer named MAIN.

Use the following syntax for the file creation qualifiers:

    $ EDIT/TPU /CREATE (default)
    $ EDIT/TPU /NOCREATE

Use the /NOCREATE qualifier to avoid invoking the editor in case you mistype the input file specification or to edit an existing file.

If EVE does not find an input file you have specified, it terminates the editing session and returns you to the system level, as in the following example:

    $ EDIT/TPU NEW.DAT /NOCREATE
    Input file does not exist: NEW.DAT;

## A.3 Debugging Package

Debug qualifiers determine whether DECTPU runs a debug file. A debug file is useful to test procedures for an application you are creating. DECTPU compiles and executes the debug file before executing TPU$INIT_PROCEDURE.

To start editing the code in the file you are debugging, use the GO command. You cannot use wildcards to specify the debug file. Use only one debug file at a time.

The debugger that is supplied with DECTPU is in SYS$SHARE:TPU$DEBUG.TPU. This file provides commands to manipulate variables and to control program execution.

Use the following syntax for the debug qualifier:

    $ EDIT/TPU /DEBUG[=debug-file]
    $ EDIT/TPU /NODEBUG (default)

There are two ways to specify a debug file of your own:

- Define the logical name TPU$DEBUG to specify your debugger file, and then use the /DEBUG qualifier when you invoke DECTPU. You can enter the definition in your LOGIN.COM file.
- Use the /DEBUG= qualifier and specify a debugger file. This overrides any definition of the TPU$DEBUG logical name. The default file type is .TPU. For example, the following command uses a debugger file named MYDEBUG.TPU to edit a file named MYPROCS.TPU:

      $ EDIT/TPU MYPROCS.TPU /DEBUG=MYDEBUG

  DECTPU assumes the debugger file is in SYS$SHARE. If your debugger file is stored elsewhere, use a complete file specification, including the device (disk) and directory.

For more information about the debugger, refer to the source file or see the DEC Text Processing Utility Reference Manual.

## A.4 Specifying Display Mode

You can specify a display mode by using following syntax:

    $ EDIT/TPU /DISPLAY={MOTIF, CHARACTER_CELL (default), DECWINDOWS}
    $ EDIT/TPU /INTERFACE={MOTIF, CHARACTER_CELL (default) , DECWINDOWS}
    $ EDIT/TPU /NODISPLAY
    $ EDIT/TPU /NOINTERFACE

If you use /DISPLAY=DECWINDOWS and DECwindows is available, DECTPU displays the editing session in a separate window on your workstation screen and enables DECwindows features; for example, the EVE screen layout includes a menu bar and scroll bars. If DECwindows is not available, DECTPU works as if on a character-cell terminal.

Display Mode with Batch Jobs

Typically you turn off the display for batch jobs or when you are using an unsupported terminal. For batch jobs, use a DECTPU command file or EVE initialization file. For example, the following command uses a command file named BATCH.TPU to invoke DECTPU for batch editing:

    $ EDIT/TPU /NODISPLAY /COMMAND=BATCH

This startup file contains commands you want EVE to perform in batch and should end with EXIT or QUIT. Some EVE commands cannot be used in batch because they prompt for a keypress or other interactive response.

## A.5 Initialization File

Initialization file qualifiers determine whether an application executes an initialization file. Processing methods with these qualifiers depend on the DECTPU application you are using. EVE initialization files contain commands to set attributes or define keys that you do not otherwise save in a section file. You cannot use wildcards to specify the initialization file. You can specify one initialization file at a time.

Settings and key definitions in an initialization file override those in a section file or in command file. When you invoke EVE, commands in an initialization file for buffer attributes, such as margins and tab stops, apply to all buffers specified on the command line and to an EVE system buffer named $DEFAULTS$. Buffers created during the session will have the same settings as $DEFAULTS$.

You can also execute an initialization file during an EVE session by using the @ command. This is useful when you want to set or change attributes or define keys for particular kinds of editing or to execute a series of related commands. EVE can create a buffer other than MAIN at startup.

Use the following syntax for the initialization qualifiers:

    $ EDIT/TPU /INITIALIZATION[=init-file] (default)
    $ EDIT/TPU /NOINITIALIZATION

There are three ways to specify the EVE initialization file you want to use:

- Name the initialization file EVE$INIT.EVE. By default, EVE looks for this initialization file first in your current directory. If the file is not found there, EVE then looks for it in SYS$LOGIN (your top-level login directory). Thus, you can have different EVE initialization files for particular directories, and you can have a standard initialization file for editing in directories that do not have an EVE$INIT.EVE file.
- Define the logical name EVE$INIT to specify the initialization file. For example, the following commands define EVE$INIT as MYINIT.EVE in your top-level login directory and then use that initialization file to invoke EVE:

      $ DEFINE EVE$INIT SYS$LOGIN:MYINIT
      $ EDIT/TPU

  This is useful if there is an initialization file you want to use for all or most editing sessions---including when you invoke EVE within MAIL---and lets you keep that initialization file in any directory or subdirectory. Defining the logical name overrides the search for an EVE$INIT.EVE file. If you omit parts of the file specification (such as a device disk) from the logical name definition, EVE supplies them from EVE$INIT.EVE in your current default directory or your SYS$LOGIN directory. You can put the definition in your LOGIN.COM file.
- Use the /INITIALIZATION= qualifier and specify an initialization file. This overrides any definition of the logical name EVE$INIT and overrides the default search for an EVE$INIT.EVE file. For example, the following command uses an initialization file named MYINIT.EVE in your current directory to invoke EVE:

      $ EDIT/TPU /INITIALIZATION=MYINIT

Use /NOINITIALIZATION if you have defined the logical name EVE$INIT or created an EVE$INIT.EVE file and do not want the initialization file executed for a particular editing session. Also, using /NOINITIALIZATION makes startup faster because EVE does not search for an EVE$INIT.EVE file and does not parse commands at startup.

## A.6 Journaling

Journaling qualifiers determine the type of journaling, if any. Journal files record your edits so that if a system failure interrupts your editing session, you can recover your work. Processing results with journaling qualifiers depends on the DECTPU application you are using.

There are two types of journaling, as follows:

- Buffer-change journaling
  Creates a journal file for each text buffer. This is the EVE default. Buffer-change journaling works on DECwindows or character-cell terminals. The journal file name consists of the name of the file or buffer being edited and the file type .TPU$JOURNAL.
- Keystroke journaling
  Creates a single journal file for the editing session, regardless of the number of buffers you create.
  To enable keystroke journaling, use the /JOURNAL= qualifier and specify the journal file you want created. For example, the following command invokes DECTPU, creating a keystroke journal file in your current directory:

      $ EDIT/TPU /JOURNAL=MYSESSION

  Keystroke journaling does not work on DECwindows and also has other restrictions. You cannot use wildcards to specify the keystroke journal file.
  If you enable keystroke journaling, EVE also creates a buffer-change journal file for each text buffer. This double journaling may slow performance, depending on the kind of edits you make. You can disable buffer-change journaling for a particular buffer or for all your buffers by using SET NOJOURNALING commands during your editing session.

For information about recovering your edits, see Section A.11.

Previous | Next | Contents | Index

| privacy and legal statement |
6021PRO_016.HTML