HP (Hewlett-Packard) c-tree-SQL ISQL and Tool reference Guide Printer User Manual


 
ISQL and Tools
3-26 FairCom Corporation
edited. When you exit the editor, ISQL writes the buffer contents as the last statement in the
history buffer.
By default, ISQL invokes the vi editor on UNIX and the MS-DOS editor on NT. You can
change the default by setting the EDITOR environment variable:
On UNIX, set the environment variable at the operating system command level:
setenv EDITOR /usr/local/bin/gmacs
On NT, set the environment variable in the initialization file DHSQL.INI in the windows
directory:
EDITOR = c:\msoffice\winword.exe
Examples
The following example uses the ! (shell) command to show the currently-set value of the EDI-
TOR environment variable in the UNIX environment (it shows that it is set to invoke the GNU
emacs editor). Then, the example uses the EDIT command to read in the fifth statement in the
history buffer into an editing buffer.
ISQL> ! printenv EDITOR
/usr/local/bin/gmacs
ISQL> EDIT 5;
The following example edits the last statement in the history buffer:
ISQL> select * from systable; -- bad table name!
*
error(-20005): Table/View/Synonym not found
ISQL> EDIT -- invoke an editor to correct the error
.
.
.
ISQL> list –- corrected statement is now the current statement:
select * from systables
ISQL> run -- run the corrected statement
.
.
.
3.7.9 EXIT or QUIT
Syntax
EXIT
Description
The EXIT statement terminates the ISQL session.
Related Statements
QUIT and EXIT are synonymous. There is no difference in their effect.