UNLOAD

The UNLOAD statement copies data from the current database to a file.

4GLREF00000188.gif

character is a literal delimiter symbol, enclosed between quotation marks.

delimiter variable is a CHAR or VARCHAR variable containing single symbol to separate adjacent columns within the ASCII representation each row from the database in the output file.

filename specifies the name of an output file in which to store the rows retrieved by the SELECT statement. This can include a pathname.

file variable is a CHAR or VARCHAR variable containing a filename.

select variable is a CHAR or VARCHAR variable containing a SELECT statement.

The UNLOAD statement must include a SELECT statement (directly, or in a variable) to specify what rows to copy into filename. UNLOAD does not delete the copied data. The user must have Select privileges on every column specified in the SELECT statement.

The DATABASE statement must first open the database that SELECT accesses.

You cannot use the PREPARE statement to preprocess an UNLOAD statement.

Reference

DATABASE

LOAD