Unload data from a database
The UNLOAD statement writes the rows that a SELECT statement retrieves to an operating-system file. This operating-system file is called an UNLOAD TO file.
The data values in this file contains characters that the client code set defines. If the client locale supports a multibyte code set, the data can include multibyte characters from the code set.
If the database locale supports a code set that is different from but convertible to the client code set, the client performs code-set conversion on the data before it writes the data to the UNLOAD TO file. (For more information, see Perform code-set conversion.)
The client locale and certain environment variables determine the
output format of certain data types in the UNLOAD TO file.
These data types include DATE values, MONEY values, values of numeric
data types, and DATETIME values. For further information, see Display formats and Customize display formats.
Important: You
can use an UNLOAD TO file, which the UNLOAD statement
generates, as the input file (the LOAD FROM file)
to a LOAD statement that loads another table or database. When you
use an UNLOAD TO file in this manner, make sure
that all environment variables and the client locale have the same
values when you perform the LOAD as they did when you performed the
UNLOAD.