IBM Books

Data Movement Utilities Guide and Reference

EXPORT Command

Command Syntax

>>-EXPORT TO--filename--OF--filetype---------------------------->
 
>-----+---------------------------+----------------------------->
      |          .-,-----------.  |
      |          V             |  |
      '-LOBS TO-----lob-path---+--'
 
>-----+---------------------------+----------------------------->
      |          .-,-----------.  |
      |          V             |  |
      '-LOBFILE-----filename---+--'
 
>-----+-----------------------------------+--------------------->
      |              .-----------------.  |
      |              V                 |  |
      '-MODIFIED BY-----filetype-mod---+--'
 
>-----+--------------------------------------+------------------>
      |              .-,--------------.      |
      |              V                |      |
      '-METHOD N--(-----column-name---+---)--'
 
>-----+-------------------------+------------------------------->
      '-MESSAGES--message-file--'
 
>-----+-select-statement---------------------------------------------+>
      '-HIERARCHY--+-STARTING--sub-table-name--+---+---------------+-'
                   '-| traversal-order-list |--'   '-where-clause--'
 
>--------------------------------------------------------------><
 
traversal-order-list
 
       .-,-----------------.
       V                   |
|---(-----sub-table-name---+---)--------------------------------|
 

Command Parameters

HIERARCHY traversal-order-list
Export a sub-hierarchy using the specified traverse order. All sub-tables must be listed in PRE-ORDER fashion. The first sub-table name is used as the target table name for the SELECT statement.

HIERARCHY STARTING sub-table-name
Using the default traverse order (OUTER order for ASC, DEL, or WSF files, or the order stored in PC/IXF data files), export a sub-hierarchy starting from sub-table-name.

LOBFILE filename
Specifies one or more base file names for the LOB files. When name space is exhausted for the first name, the second name is used, and so on.

When creating LOB files during an export operation, file names are constructed by appending the current base name from this list to the current path (from lob-path), and then appending a 3-digit sequence number. For example, if the current LOB path is the directory /u/foo/lob/path, and the current LOB file name is bar, the LOB files created will be /u/foo/lob/path/bar.001, /u/foo/lob/path/bar.002, and so on.

LOBS TO lob-path
Specifies one or more paths to directories in which the LOB files are to be stored. When file space is exhausted on the first path, the second path will be used, and so on.

MESSAGES message-file
Specifies the destination for warning and error messages that occur during an export operation. If the file already exists, the export utility appends the information. If message-file is omitted, the messages are written to standard output.

METHOD N column-name
Specifies one or more column names to be used in the output file. If this parameter is not specified, the column names in the table are used. This parameter is valid only for WSF and IXF files, but is not valid when exporting hierarchical data.

MODIFIED BY filetype-mod
Specifies additional options (see Table 2).

OF filetype
Specifies the format of the data in the output file:

For more information about file formats, see Appendix C. Export/Import/Load Utility File Formats.

select-statement
Specifies the SELECT statement that will return the data to be exported. If the SELECT statement causes an error, a message is written to the message file (or to standard output). If the error code is one of SQL0012W, SQL0347W, SQL0360W, SQL0437W, or SQL1824W, the export operation continues; otherwise, it stops.

TO filename
Specifies the name of the file to which data is to be exported. If the complete path to the file is not specified, the export utility uses the current directory and the default drive as the destination.

If the name of a file that already exists is specified, the export utility overwrites the contents of the file; it does not append the information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]