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.
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 – 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.
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"