SET ECHO

From InterBase

Go Up to isql Command Reference


Specifies whether commands are displayed to the isql output area before being executed.

SET ECHO [ON | OFF];
Argument Description

ON

Turns on command echoing [default]

OFF

Turns off command echoing

Description: By default, commands in script files are displayed (echoed) in the isql output area, before being executed. Use SET ECHO OFF to change the default behavior and suppress echoing of commands. This can be useful when sending the output of a script to a file, if you want only the results of the script and not the statements themselves in the output file.

Command echoing is useful if you want to see the commands as well as the results in the isql output area.

Tip:
The ON and OFF keywords are optional. If they are omitted, SET ECHO switches from one mode to the other. Although you can save typing by omitting the optional keyword, including the keyword is recommended because it avoids potential confusion.

Example: Suppose you execute the following script from IBConsole isql:

. . .
SET ECHO OFF;
SELECT * FROM COUNTRY;
SET ECHO ON;
SELECT * FROM COUNTRY;
EXIT;

The output (in a file or the isql output area) looks like this:

. . .
SET ECHO OFF;
COUNTRY     CURRENCY
=========== ========
USA         Dollar
England     Pound
. . .
SELECT * FROM COUNTRY;
COUNTRY     CURRENCY
=========== ========
USA         Dollar
England     Pound
. . .

The first SELECT statement is not displayed, because ECHO is OFF. Notice also that the SET ECHO ON statement itself is not displayed, because when it is executed, ECHO is still OFF. After it is executed, however, the second SELECT statement is displayed.

See Also