Product Documentation

FairCom ISQL

Previous Topic

Next Topic

SPOOL

Syntax

SPOOL filename [ON] ;

SPOOL OFF ;

SPOOL OUT ;

Description

The SPOOL statement writes output from interactive SQL statements to the specified file.

Arguments

filename ON

Opens the file specified by filename and writes the displayed output into that file. The filename cannot include punctuation marks such as a period (.) or comma (,).

OFF

Closes the file opened by the SPOOL ON statement.

OUT

Closes the file opened by the SPOOL ON statement and prints the file. The SPOOL OUT statement passes the file to the system utility statement pr and the output is piped to lpr.

Example

To record the displayed output into the file called STK, enter:


ISQL> SPOOL STK ON ;


ISQL> SELECT * FROM customer ;


ISQL> SPOOL OFF ;


TOCIndex