1 EDIT Calls an editor that lets you modify the SQL statements you issued within a terminal session. SQL supports a variety editors, some of which are: o EDT o DEC Text Processing Utility (DECTPU) editors on OpenVMS, such as EVE o Language-Sensitive Editor (LSE) on OpenVMS, which is based on DECTPU and provides templates that guide you in entering syntactically correct statements To invoke an editor other than the default, you must define the SQL$EDIT logical name. You can use the editor you choose with your usual initialization file to modify your previous SQL statements, construct your next statement or group of statements, or include a file with other statements. 2 Environment You can issue the EDIT statement only in interactive SQL. 2 Format EDIT --+--------------+--> +-> --+ +-> * ---------+ 2 Arguments 3 *_(wildcard) Specifies a wildcard character. If you use the * (asterisk) wildcard character, SQL includes in the editing buffer the number of statements specified in the last SET EDIT KEEP statement. If you do not use the SET EDIT KEEP statement, EDIT * puts the last 20 statements in your editing buffer. If you omit the * (asterisk) wildcard character, SQL includes the last statement issued in the editing buffer. 3 number Specifies the number of previous statements you want to edit, up to the number specified in the last SET EDIT KEEP statement. If you specify zero as the number, then SQL does not include any statements in the editing buffer. If you omit the number argument, SQL includes the last statement issued in the editing buffer. 2 Examples Example 1: Correcting a misspelled statement 1. Make a mistake: SQL> SELECT JOB_TITLE FROM JOSB; %SQL-F-RELNOTDEF, Table JOSB is not defined in schema SQL> 2. Invoke the editor: SQL> EDIT 3. When in the editor, change JOSB to JOBS. See the manual for the editor you are using for detailed editing instructions. 4. Exit from the editor. SQL automatically executes the contents of the editing buffer. * EXIT SELECT JOB_TITLE FROM JOBS; Associate Programmer Clerk Assistant Clerk Department Manager Dept. Supervisor . . .