RDB/VMS Relational Database Operator EDIT — VMS CDD+_4.1A
Calls an editor that lets you edit the RDO statements you have issued
within a terminal session. By default, Rdb/VMS uses the EDT editor.
You can use the editor to modify your previous RDO statements,
construct your next statement or group of statements, or include a
file with other statements.
Example using EDT to edit an RDO statement:
RDO> FOR J IN JOSB PRINT J.JOB_TITLE END_FOR
%RDO-F-RELNOTDEF, Relation JOSB is not defined in database
RDO> EDIT
FOR J IN JOSB PRINT J.JOB_TITLE END_FOR
[EOB]
Additional information available:
More
If you have VAXTPU installed on your system, you can invoke VAXTPU
with the EDIT statement in an RDO session. Define the logical name
RDO$EDIT in the following way:
$ DEFINE RDO$EDIT "TPU"
Then, when you type EDIT in an RDO session, VAXTPU is invoked.
There are three forms of the EDIT statement:
EDIT Without a parameter, EDIT operates on the last RDO statement
you typed.
EDIT n When you supply an integer n as the parameter, EDIT operates
on the n previous statements. If n = 0, then the resulting
editing buffer is empty.
EDIT * The wildcard allows you to edit a number of previous command
lines. The number depends on the value you specify in the
SET EDIT statement. By default, this number is twenty.
That is, when you type EDIT *, you get your last twenty
commands in the editing buffer.
When you use the EDIT statement:
o RDO invokes the editor and initializes the editor according to
your editor initialization file (the file indicated by the
logical name EDTINI or TPUSECINI). If you do not have an
EDTINI.EDT file, RDO uses the system defaults.
o RDO places the commands you have asked for in an editing buffer.
o The RDO> prompt disappears and is replaced by normal display for
the editor.
o You can now edit the RDO statement or statements. When you exit
from the editing session, RDO automatically executes all the
statements in the main editing buffer. If you quit from the
editor, RDO returns to command level and displays the RDO> prompt
without executing a statement.
If you type a statement, then type HELP to read the HELP text, then
EDIT, Rdb/VMS puts the original statement in the editing buffer, not
the HELP statement.
Format
EDIT ────┬─────>───────┬───> ├──> number ──┤ └──> typebox (*) ───────┘ number The number of previous command lines you want to edit. The default is 1. * Edit the last n command lines in the session, where n is determined by the SET EDIT KEEP statement. The default is 20.
Example
The following sequence demonstrates the correction of a misspelled
statement:
1. Make a mistake:
RDO> FOR J IN JOSB
cont> PRINT J.JOB_TITLE END_FOR
%RDO-F-RELNOTDEF, Relation JOSB is not defined in database
RDO>
2. Invoke the EDT editor:
RDO> EDIT
3. When in the editor, change "JOSB" to "JOBS".
4. Exit from the editor. RDO automatically executes the contents of
the editing buffer.
* EXIT
Associate Programmer
Clerk
Deputy Gopher
Department Manager
Dept. Supervisor
.
.
.