beautypg.com

9 /modify – Compaq DEC Text Processing Utility AA-PWCBD-TE User Manual

Page 35

background image

Getting Started with DECTPU

2.6 Using OpenVMS EDIT/TPU Command Qualifiers

$ EDIT/TPU/NOJOURNAL memo.txt

If you are developing an application layered on DECTPU, you can use the built-in
JOURNAL_OPEN to direct DECTPU to create a keystroke journal file for an
editing session. Using JOURNAL_OPEN causes DECTPU to provide a 500-byte
buffer in which to journal keystrokes. By default, DECTPU writes the contents of
the buffer to the journal file when the buffer is full.

You can use the built-in procedure SET (JOURNALING) to turn on buffer-change
journaling, even if you have used /NOJOURNAL to turn it off initially. You can
also use SET (JOURNALING) to adjust the journaling frequency.

For more information on JOURNAL_OPEN and SET (JOURNALING), see
the DEC Text Processing Utility Reference Manual. For more information on
buffer-change journaling, see Section 2.4.

Once a keystroke journal file is created, use the /RECOVER qualifier to direct
DECTPU to process the commands in the keystroke journal file. For example, the
following command causes DECTPU to recover a previous editing session on an
input file named MEMO.TXT. Because the journal file has a name different from
the input file name, both /JOURNAL and /RECOVER are used. The name of the
keystroke journal file is MEMO.TJL:

$ EDIT/TPU/RECOVER/JOURNAL=memo.tjl memo.txt

In buffer-change journaling, to recover the changes made to a specified buffer, use
the RECOVER_BUFFER built-in procedure.

For more information on RECOVER_BUFFER, see the DEC Text Processing
Utility Reference Manual
. For more information on how to recover from an
interrupted EVE editing session, see the Extensible Versatile Editor Reference
Manual
.

Note

Compaq strongly recommends the use of buffer-change journaling rather
than keystroke journaling.

2.6.9 /MODIFY

/MODIFY (default)

/NOMODIFY

The /MODIFY qualifier determines whether the first user buffer in an editing
session is modifiable. The application layered on DECTPU is responsible for
processing /MODIFY.

To determine what form of the /MODIFY qualifier was used on the DCL command
line, use the following calls:

x := GET_INFO (COMMAND_LINE, "modify");
x := GET_INFO (COMMAND_LINE, "nomodify");

The first statement returns 1 if /MODIFY was explicitly specified on the command
line, 0 otherwise. The second statement returns 1 if /NOMODIFY was explicitly
specified on the command line, 0 otherwise. If both statements return 0, then the
application is expected to determine the default behavior.

For more information on GET_INFO, see the DEC Text Processing Utility
Reference Manual
.

Getting Started with DECTPU 2–15