By default, DEC DATATRIEVE uses EDT when you issue the EDIT
command. You can specify DEC TPU, LSE, or EDT by assigning the
logical name DTR$EDIT. There are two ways to assign DTR$EDIT
to the acronym TPU, LSE, or EDT. Note that you must specify the
three-character acronym, such as TPU, not DEC TPU.
o Use the DCL DEFINE command. For example:
$ DEFINE DTR$EDIT TPU
o Use the DEC DATATRIEVE function FN$CREATE_LOG from within DEC
DATATRIEVE. For example:
DTR> FN$CREATE_LOG ("DTR$EDIT", "LSE")
The assignment from within DEC DATATRIEVE lasts for that DEC
DATATRIEVE session. To make the assignment permanent, use the
DEFINE command in your login file.
To use LSE with callable DEC DATATRIEVE, add the module
name LSE to your DEC DATATRIEVE options file. For example:
SYS$SHARE:DTRSHRxx/SHARE, - DTR$LIBRARY:TERMSERVE/LIBRARY
/INCLUDE=(ADT,EDT,GUI,HLP,LSE,TPU)
This options file enables calling programs to use ADT, the EDT
editor, Guide Mode, DEC DATATRIEVE online help, LSE, and DEC TPU.
See the documentation for LSE for more information about that
product. See the help topic DEC TPU for more information about
using DEC TPU with DEC DATATRIEVE.
1 – LSE
DEC DATATRIEVE supports editing with LSE from within DEC
DATATRIEVE. This support includes LSE templates for DEC
DATATRIEVE that allow users to edit DEC DATATRIEVE definitions,
commands, and statements in an environment that is sensitive to
the DEC DATATRIEVE syntax.
2 – Templates for LSE
The LSE templates for DEC DATATRIEVE offer command completion
and syntax recall for the intermediate to advanced DEC DATATRIEVE
user. Users of the templates should already know how to use LSE.
2.1 – DCL Level
To use the templates from DCL level, invoke LSE at the DCL prompt
and specify DEC DATATRIEVE as the editing environment. You can do
this in one of two ways:
o Use the file type .DTR for the file you wish to edit with LSE.
Specifying the .DTR file type causes LSE to use the editing
environment file for DEC DATATRIEVE.
For example, you want to use LSE to create a DEC DATATRIEVE
procedure that will generate a payroll report:
$ LSEDIT PAYROLL.DTR
This command invokes LSE and sets the language-sensitive
editing environment to DEC DATATRIEVE. The editing buffer
on your screen already contains the placeholder {DATATRIEVE_
session}. Expand {DATATRIEVE_session} by positioning the
cursor on the placeholder and pressing <CTRL/E>. You can begin
editing the procedure with LSE.
o Invoke LSE at the DCL prompt, set the language to DEC
DATATRIEVE, and type in the placeholder that begins a DEC
DATATRIEVE editing session.
For example:
$ LSEDIT
At the LSE prompt, set the language to DEC DATATRIEVE:
LSE> SET LANGUAGE DATATRIEVE
In the editing buffer, type {DATATRIEVE_session} as it
appears here, with the braces ({}). Expand that placeholder
by positioning the cursor on the placeholder and pressing
CTRL/E.
2.2 – DTR Level
To use the templates from within DEC DATATRIEVE, assign DTR$EDIT
to the acronym LSE, then use the EDIT command:
DTR> FN$CREATE_LOG ("DTR$EDIT", "LSE")
DTR> EDIT
DEC DATATRIEVE opens a LSE editing buffer. In the editing buffer,
type in the placeholder that starts a DEC DATATRIEVE session
{DATATRIEVE_session}. Expand that placeholder by positioning the
cursor on the placeholder and pressing CTRL/E.
2.3 – Key Definitions
To save keystrokes, you can define a key to print the placeholder
{DATATRIEVE_session}. For example, adding this line to your LSE
initialization file enables the use of the key sequence GOLD/D
for printing the placeholder when you are in LSE:
define key/if_state=gold D "do ""enter text {DATATRIEVE_session}"" "
LSE continues lines longer than 80 characters off the template
screen. If you don't want to insert continuation characters
to see the entire display of long lines, you can define keys
for horizontal scrolling in your LSE initialization file.
For example, you could add the following lines to your LSE
initialization file to enable right and left scrolling with use
of the GOLD (PF1) and angle bracket (<>) keys:
! Define horizontal scrolling keys
define key/if_state=gold ">" "repeat 32 shift/forward"
define key/if_state=gold "<" "repeat 32 shift/reverse"