IBM Books

Command Reference

LOAD

Loads data from files, tapes, or named pipes into a DB2 table.

Scope

This command only affects the node on which it is executed.

In a multi-node environment, this command can be used only with ASC or DEL files. IXF files can be loaded only if the table exists on a single node nodegroup.

Authorization

One of the following:

sysadm
dbadm

Required Connection

Database. If implicit connect is enabled, a connection to the default database is established.

Instance. An explicit attachment is not required. If a connection to the database has been established, an implicit attachment to the local instance is attempted.

Command Syntax



               +-,-----------+
               V             |
>>-LOAD FROM-----+-filename-++-OF--filetype--------------------->
                 +-pipename-+
                 +-device---+
 
>--+---------------------------+-------------------------------->
   |            +-,---------+  |
   |            V           |  |
   +-LOBS FROM----lob-path--+--+
 
>--+---------------------------------+-------------------------->
   |              +---------------+  |
   |              V               |  |
   +-MODIFIED BY----filetype-mod--+--+
 
>--+---------------------------------------------------------------------------------------+>
   |                 +-,-------------------------+                                         |
   |                 V                           |                                         |
   +-METHOD--+-L--(----column-start--column-end--+--)--+--------------------------------+-++
             |                                         |                     +-,--+     | |
             |                                         |                     V    |     | |
             |                                         +-NULL INDICATORS--(----n--+--)--+ |
             |       +-,------------+                                                     |
             |       V              |                                                     |
             +-N--(----column-name--+--)--------------------------------------------------+
             |       +-,----------------+                                                 |
             |       V                  |                                                 |
             +-P--(----column-position--+--)----------------------------------------------+
 
>--+---------------+--+---------------------+--+--------------+->
   +-SAVECOUNT--n--+  +-RESTARTCOUNT--+-B-+-+  +-ROWCOUNT--n--+
                                      +-D-+
                                      +-n-+
 
>--+------------------+--+-------------------------+------------>
   +-WARNINGCOUNT--n--+  +-MESSAGES--message-file--+
 
>--+---------------------------+--+-INSERT----+----------------->
   +-REMOTE FILE--remote-file--+  +-REPLACE---+
                                  +-RESTART---+
                                  +-TERMINATE-+
 
>-INTO--table-name---+----------------------------+------------->
                     |    +-,--------------+      |
                     |    V                |      |
                     +-(----insert-column--+--)---+
 
>--+----------------------------+------------------------------->
   +-FOR EXCEPTION--table-name--+
 
>--+--------------------------------------------------------------------------------------+->
   |             +-YES--+-+---------------------------------------------------------+-+-+ |
   +-STATISTICS--+-NO-------WITH DISTRIBUTION-------------------------------------------+-+
                        |                      +-AND-+----------+---INDEXES ALL--+    |
                        |                            +-DETAILED-+                     |
                        +-+-------------------------------------+---------------------+
                          +--+-AND-++----------+---INDEXES ALL--+
                             +-FOR-++-DETAILED-+
 
>--+----------------------------------------------------------------+>
   |       +-NO----------------------------------------------------+|
   +-COPY--+-YES--+-USE ADSM--+---------------------------+-------+++
   |              |           +-OPEN--num-sess--SESSIONS--+       | |
   |              |     +-,-----------------+                     | |
   |              |     V                   |                     | |
   |              +-TO----device/directory--+---------------------+ |
   |              +-LOAD--lib-name--+---------------------------+-+ |
   |                                +-OPEN--num-sess--SESSIONS--+   |
   +-NONRECOVERABLE-------------------------------------------------+
 
>--+------------------------+----------------------------------->
   |        +-,----------+  |
   |        V            |  |
   +-USING----directory--+--+
 
>-+--------------+--+-------------------+----------------------->
  +-HOLD QUIESCE-+  +-WITHOUT PROMPTING-+
 
>--+---------------------------+--+---------------------------+->
   +-DATA BUFFER--buffer-size--+  +-SORT BUFFER--buffer-size--+
 
>--+---------------------+--+----------------------+-----------><
   +-CPU_PARALLELISM--n--+  +-DISK_PARALLELISM--n--+
 

Command Parameters

FROM filename/pipename/device
Specifies the file, pipe, or device that contains the data being loaded. This file/pipe/device must reside on the node where the database resides. If several names are specified, they will be processed in sequence. If the last item specified is a tape device, the user is prompted for another tape. Valid response options are:
c
Continue. Continue using the device that generated the warning message (for example, when a new tape has been mounted)
d
Device terminate. Stop using the device that generated the warning message (for example, when there are no more tapes)
t
Terminate. Terminate all devices.

Notes:

  1. It is recommended that the fully qualified file name be used. If the server is remote, the fully qualified file name must be used. If the database resides on the same node as the caller, relative paths may be used.

  2. Loading data from multiple IXF files is supported if the files are physically separate, but logically one file. It is not supported if the files are both logically and physically separate.
OF filetype
Specifies the format of the data in the input file:

For more information about file formats, see Appendix C. "IMPORT/EXPORT/LOAD Utility File Formats".

LOBS FROM lob-path
The path to the data files containing LOB values to be loaded. The path must end with a slash (/). The names of the LOB data files are stored in the main data file (ASC, DEL, or IXF), in the column that will be loaded into the LOB column. This option is ignored if lobsinfile is not specified within the filetype-mod string.
MODIFIED BY filetype-mod
Specifies additional information unique to the ASC, DEL, or IXF file format (see ***).
METHOD
L
Specifies the start and end column numbers from which to load data.

Note:This method can only be used with ASC files, and is the only valid option for that file type.

N
Specifies the names of the columns in the data file to be loaded. The case of these column names must match the case of the corresponding names in the system catalogs. Each column in the table that is not nullable should be included in this list. Specify only complete subsets of column names (for example, given file columns F1, F2, F3, F4, F5, and F6, and table columns C1 INT, C2 INT NOT NULL, C3 INT NOT NULL, and C4 INT, method N (F1,F2,F3,F4) insert into table_name (C1,C2,C3,C4) is a valid request, while method N (F1,F4) is not valid, since there will be no data to put into C3.

Note:This method can only be used with IXF files.

P
Specifies the numbers of the columns to be loaded. Each column in the table that is not nullable should be included in this list. Specify only complete subsets of column numbers (for example, given file columns F1, F2, F3, F4, F5, and F6, and table columns C1 INT, C2 INT NOT NULL, C3 INT NOT NULL, and C4 INT, method P (1,2,3,4) is a valid request, while method P (1,4) is not valid.

Note:This method can only be used with IXF or DEL files, and is the only valid option for the DEL file type.

NULL INDICATORS n
Specifies a column (by number) to be used as a NULL indicator field. If this option is used, a NULL indicator column for each data column must also be specified. A value of zero indicates that the data column is not nullable, and that there will always be data in that column.

A value of Y in the NULL indicator column specifies that the column data is NULL. Any character other than Y in the NULL indicator column specifies that the column data is not NULL, and that column data specified by the METHOD L option will be loaded.

The NULL indicator character can be changed using the MODIFIED BY option (see ***).

SAVECOUNT n
Specifies that LOAD is to establish consistency points after every n rows. This value is converted to a page count, and rounded up to intervals of the extent size. Since a message is issued at each consistency point, this option should be selected if the load will be monitored using LOAD QUERY. If the value of n is not sufficiently high, the synchronization of activities performed at each consistency point will impact performance.

The default value is 0, meaning that no consistency points will be established, unless necessary.

RESTARTCOUNT
B
LOAD will restart at the build phase.
D
LOAD will restart at the delete phase.
n
An integer specifying that the load is to be started at record n+1. The first n records are skipped.

This option can be specified with any of the INSERT, REPLACE, or RESTART modes. B or D must not be specified for the INSERT or the REPLACE mode.

ROWCOUNT n
Specifies the number of n physical records in the file to be loaded. Allows a user to load only the first n rows in a file.
WARNINGCOUNT n
Stops the load after n warnings. Set this parameter if no warnings are expected, but verification that the correct file and table are being used is desired. If n is 0, or this option is not specified, the load will continue regardless of the number of warnings issued.

If the load is stopped because the threshold of warnings was encountered, another load can be started in RESTART mode by specifying the RESTARTCOUNT option. Alternatively, another load can be initiated in REPLACE mode, starting at the beginning of the input file.

MESSAGES message-file
Specifies the destination for warning and error messages that occur during the load. If a message file is not specified, messages are written to a file in the current directory.

If the complete path to the file is not specified, LOAD uses the current directory and the default drive as the destination.

If the name of a file that already exists is specified, LOAD appends the information.

REMOTE FILE remote-file
Specifies the base name to be used when creating temporary files during a load, and should be fully qualified according to the server node. For more information about remote files, see ***).
INSERT
One of four modes under which the load utility can execute. Adds the loaded data to the table without changing the existing table data.
REPLACE
One of four modes under which the load utility can execute. Deletes all existing data from the table, and inserts the loaded data. The table definition and index definitions are not changed.

RESTART
One of four modes under which the load utility can execute. Restarts LOAD after a previous load was interrupted.

It is important to keep track of the last commit point. This information is stored in the message file and is passed to LOAD. Use LOAD QUERY to get this information if the database connection was lost during the load.

TERMINATE
One of four modes under which the load utility can execute. Terminates a previously interrupted load and moves the table spaces in which the table resides from load pending state to recovery pending state. The table spaces cannot be used until a backup has been restored and the table spaces have been rolled forward. A restart should be issued before attempting to complete an interrupted load.
Note:This option is not recommended for general use; it should only be selected if an unrecoverable error has occurred.
INTO table-name
Specifies the table within the database into which the data is to be loaded. The table cannot be a system catalog table. An alias, or the fully qualified or unqualified table name can be specified. A qualified table name is in the form schema.tablename. If an unqualified table name is specified, the table will be qualified with the current authorization ID.
insert-column
Specifies the name of a column within the table into which the data is to be inserted.
FOR EXCEPTION table-name
Specifies the exception table into which rows in error will be copied. Any row that is in violation of a unique index or a primary key index is copied.
STATISTICS YES
Specifies that statistics will be gathered for the table and for any existing indexes. This option is not supported if the load is in INSERT or in RESTART mode.  
WITH DISTRIBUTION
Specifies that distribution statistics are requested.
AND INDEXES ALL
Update statistics for both the table and its indexes.
FOR INDEXES ALL
Update statistics for the indexes only.
DETAILED
Specifies that extended index statistics are requested.
STATISTICS NO
Specifies that no statistics will be gathered, and that the statistics in the catalogs will not be altered.
COPY NO
Specifies that the table space in which the table resides will be placed in backup pending state if forward recovery is enabled (that is, logretain or userexit is on). The data will not be accessible until a table space backup or a full database backup is made.
COPY YES
Specifies that a copy of the changes made will be saved. This option is invalid if forward recovery is disabled (both logretain and userexit are off).  
USE ADSM
Specifies that the copy will be stored using ADSM.
OPEN num-sess SESSIONS
The number of I/O sessions to be used with ADSM or the vendor product. The default value is 1.
TO device/directory
Specifies the device or directory on which the copy image will be created.
LOAD lib-name
The name of the shared library (DLL on OS/2 or the Windows operating system) containing the vendor backup and restore I/O functions to be used. It may contain the full path. If the full path is not given, it will default to the path where the user exit programs reside.
NONRECOVERABLE
Specifies that the load transaction is to be marked as non-recoverable, and that it will not be possible to recover it by a subsequent rollforward action. The rollforward utility will skip the transaction, and will mark the table into which data was being loaded as "invalid". The utility will also ignore any subsequent transactions against that table. After the roll forward is completed, such a table can only be dropped.

With this option, table spaces are not put in backup pending state following the load operation, and a copy of the loaded data does not have to be made during the load.

USING directory
Temporary files are used when indexes are created. The directories in which these temporary files are created can be specified. Otherwise, the files are created in the sqllib/tmp directory of the home directory of the DB2INSTANCE owner. Ensure that there is enough space on these directories to hold all index keys for the data being loaded.

If more than one directory is specified, each directory should be on a different file system, and each file system should be on a different disk, to optimize performance.

HOLD QUIESCE
Specifies that the utility should leave the table in quiesced exclusive state after the load.
WITHOUT PROMPTING
Specifies that the list of data files contains all the files that are to be loaded, and that the devices/directories listed are sufficient for the entire load. If a continuation input file is not found, or the copy targets are filled before the load finishes, the load will fail, and the table will remain in load pending state.

If this option is not specified, and the tape device encounters an end of tape for the copy image, or the last item listed is a tape device, the user is prompted for a new tape on that device.

DATA BUFFER buffer-size
Specifies the number of 4KB pages (regardless of the degree of parallelism) to use as buffered space for transferring data within the utility. If the value specified is less than the algorithmic minimum, the minimum required resource is used, and no warning is returned.

This memory is allocated directly from the utility heap, whose size can be modified through the util_heap_sz database configuration parameter.

If a value is not specified, an intelligent default is calculated by the utility at run time. The default is based on a percentage of the free space available in the utility heap at the instantiation time of the loader, as well as some characteristics of the table.

SORT BUFFER buffer-size
Use this parameter to specify the number of 4KB pages of memory that are to be used for sorting the index keys during a load operation.
Note:Sort buffer size has a very large impact on sort performance. Therefore, for very large tables (for example, tables in excess of 100M), this buffer should be set as large as possible.

If a value is not specified, the utility uses the larger of:

If a value greater than zero, but less than the required minimum is specified, the minimum value for that load is returned.

CPU_PARALLELISM n
Specifies the number of processes or threads that the load utility will spawn for parsing, converting and formatting records when building table objects. This parameter is designed to exploit SMP parallelism. It is particularly useful when loading presorted data, because record order in the source data is preserved. If the value of this parameter is zero, the load utility uses an intelligent default value at run time.
Note:If this parameter is used with tables containing either LOB or LONG VARCHAR fields, its value becomes one, regardless of the number of system CPUs or the value specified by the user.
DISK_PARALLELISM n
Specifies the number of processes or threads that the load utility will spawn for writing data to the table space containers. If a value is not specified, the utility selects an intelligent default based on the number of table space containers and the characteristics of the table.

Example

Example 1

TABLE1 has 5 columns:

COL1 VARCHAR 20 NOT NULL WITH DEFAULT
COL2 SMALLINT
COL3 CHAR 4
COL4 CHAR 2 NOT NULL WITH DEFAULT
COL5 CHAR 2 NOT NULL

ASCFILE1 has 6 elements:

ELE1 positions 01 to 20
ELE2 positions 21 to 22
ELE5 positions 23 to 23
ELE3 positions 24 to 27
ELE4 positions 28 to 31
ELE6 positions 32 to 32
ELE6 positions 33 to 40

Data Records:

   1...5....10...15...20...25...30...35...40
   Test data 1         XXN 123abcdN
   Test data 2 and 3   QQY    wxyzN
   Test data 4,5 and 6 WWN6789    Y

The following command loads the table from the file:

   db2 load from ascfile1 of asc modified by T reclen=40
      method L (1 20, 21 22, 24 27, 28 31)
      null indicators (0,0,23,32)
      insert into table1 (col1, col5, col2, col3)
Note:

The specification of T in the MODIFIED BY parameter forces the truncation of blanks in VARCHAR columns (COL1, for example, which is 11, 17 and 19 bytes long, in rows 1, 2 and 3, respectively).

The specification of reclen=40 in the MODIFIED BY parameter indicates that there is no new-line character at the end of each input record, and that each record is 40 bytes long. The last 8 bytes are not used to load the table.

Since COL4 is not provided in the input file, it will be inserted into TABLE1 with its default value (it is defined NOT NULL WITH DEFAULT).

Positions 23 and 32 are used to indicate whether COL2 and COL3 of TABLE1 will be loaded NULL for a given row. If there is a Y in the column's null indicator position for a given record, the column will be NULL. If there is an N, the data values in the columns data positions of the input record (as defined in L(........)) are used as the source of column data for the row. In this example, neither column in row 1 is NULL; COL2 in row 2 is NULL; and COL3 in row 3 is NULL.

In this example, the NULL INDICATORS for COL1 and COL5 are specified as 0 (zero), indicating that the data is not nullable.

The NULL INDICATOR for a given column can be anywhere in the input record, but the position must be specified, and the Y or N values must be supplied.

Example 2 (Loading LOBs from Files)

TABLE1 has 3 columns:

COL1 CHAR 4 NOT NULL WITH DEFAULT
LOB1 LOB
LOB2 LOB

ASCFILE1 has 3 elements:

ELE1 positions 01 to 04
ELE2 positions 06 to 13
ELE3 positions 15 to 22

The following files reside in either /u/user1 or /u/user1/bin:

ASCFILE2 has LOB data
ASCFILE3 has LOB data
ASCFILE4 has LOB data
ASCFILE5 has LOB data
ASCFILE6 has LOB data
ASCFILE7 has LOB data

Data Records in ASCFILE1:

   1...5....10...15...20...25...30.
   REC1 ASCFILE2 ASCFILE3
   REC2 ASCFILE4 ASCFILE5
   REC3 ASCFILE6 ASCFILE7

The following command loads the table from the file:

   db2 load from ascfile1 of asc
      lobs from /u/user1, /u/user1/bin
      modified by lobsinfile reclen=22
      method L (1 4, 6 13, 15 22)
      insert into table1
Note:

The specification of lobsinfile in the MODIFIED BY parameter tells the loader that all LOB data is to be loaded from files.

The specification of reclen=22 in the MODIFIED BY parameter indicates that there is no new-line character at the end of each input record, and that each record is 22 bytes long.

LOB data is contained in 6 files, ASCFILE2 through ASCFILE7. Each file contains the data that will be used to load a LOB column for a specific row. The relationship between LOBs and other data is specified in ASCFILE1. The first record of this file tells the loader to place REC1 in COL1 of row 1. The contents of ASCFILE2 will be used to load LOB1 of row 1, and the contents of ASCFILE3 will be used to load LOB2 of row 1. Similarly, ASCFILE4 and ASCFILE5 will be used to load LOB1 and LOB2 of row 2, and ASCFILE6 and ASCFILE7 will be used to load the LOBs of row 3.

The LOBS FROM parameter contains 2 paths that will be searched for the named LOB files when those files are required by the loader.

To load LOBs directly from ASCFILE1 (a non-delimited ASCII file), without the LOBSINFILE option, the following rules must be observed:

Usage Notes

Data is loaded in the sequence that appears in the input file. If a particular sequence is desired, the data should be sorted before LOAD is executed.

LOAD builds indexes based on existing definitions. The exception tables are used to handle duplicates on unique keys. LOAD does not perform referential integrity or constraint checking. If these are included in the table definition, the tables are placed in check pending state, and the user must either force the check flag, or execute the SET CONSTRAINTS statement.

File Type Modifications
Note:The load utility does not issue a warning if an attempt is made to use unsupported file types with the MODIFIED BY option. If this is attempted, the load fails, and an error code is returned.

Table 9. Valid File Type Modifications (LOAD)
Modification Description
All File Formats
anyorder This modifier is used in conjunction with the cpu_parallelism parameter. Specifies that the preservation of source data order is not required, yielding significant additional performance benefit on SMP systems. If the value of cpu_parallelism is 1, this option is ignored. This option is not supported if SAVECOUNT > 0, since crash recovery after a consistency point requires that data be loaded in sequence.
fastparse Reduced data checking is done on user-supplied column values, and performance is enhanced. Tables loaded under this option are guaranteed to be architecturally correct, and the utility is guaranteed to perform sufficient data checking to prevent a segmentation violation or trap. Data that is in correct form will be loaded correctly.

This option does not affect referential integrity checking or constraints checking; it merely reduces syntax checking of the supplied data. For example, if the value 123qwr4 were encountered as a field entry for an integer column in an ASC file, the load utility would ordinarily flag a syntax error, since the value does not represent a valid number. With FASTPARSE, a syntax error is not detected, and an arbitrary number is loaded into the integer field. Care must be taken to use this modifier with clean data only. Performance improvements using this option with ASCII data can be quite substantial. FASTPARSE does not significantly enhance performance with PC/IXF data, since IXF is a binary format, and FASTPARSE affects parsing and conversion from ASCII to internal forms.

lobsinfile lob-path specifies the path to the files containing LOB values. The ASC, DEL, or IXF load input files contain the names of the files having LOB data in the LOB column.
nodefaults If a source column for a target table column is not explicitly specified, and the table column is not nullable, default values are not loaded. Without this option, if a source column for one of the target table columns is not explicitly specified, one of the following occurs:
  • If the column is defaultable, the default value is loaded
  • If the column is nullable and not defaultable, a NULL is loaded
  • If the column is not nullable and not defaultable, an error is returned, and the utility stops processing.
noheader Skips the header verification code.

db2split - Data Declustering Tool writes a header to each file contributing data to a table in a multi-node nodegroup. The header includes the node number, the partitioning map, and the partitioning key specification. The load utility requires this information to verify that the data is being loaded at the right node. When loading files into a table that exists on a single-node nodegroup, the headers do not exist, and this option causes the load utility to skip the header verification code.

norowwarnings Suppresses all warnings about rejected rows.
pagefreespace=x x is an integer between 0 and 100 inclusive. The value is interpreted as the percentage of each data page that is to be left as free space.

If the specified value is invalid because of the minimum row size, (for example, a row that is at least 3 000 bytes long, and an x value of 50), the row will be placed on a new page. If a value of 100 is specified, each row will reside on a new page.

totalfreespace=x x is an integer between 0 and 100 inclusive. The value is interpreted as the percentage of the total pages in the table that is to be appended to the end of the table as free space. For example, if x is 20, and the table has 100 data pages, 20 additional empty pages will be appended. The total number of data pages for the table will be 120.
usedefaults If a source column for a target table column has been specified, but it contains no data for one or more row instances, default values are loaded. Examples of missing data are:
  • For DEL files: ",," is specified for the column
  • For DEL/ASC/WSF files: A row that does not have enough columns, or is not long enough for the original specification.
instance, one of the following occurs:
  • If the column is nullable, a NULL is loaded
  • If the column is not nullable, the utility rejects the row.
ASCII File Formats (ASC/DEL)
codepage=x x is an ASCII character string. The value is interpreted as the code page of the data in the input data set. Converts character data (and numeric data specified in characters) from this code page to the database code page during the load operation.

The following rules apply:

  • For pure DBCS (graphic), mixed DBCS, and EUC, delimiters are restricted to the range of x00 to x3F, inclusive.
  • For DEL data specified in an EBCDIC code page, the delimiters may not coincide with the shift-in and shift-out DBCS characters.
  • nullindchar must specify symbols included in the standard ASCII set between code points x20 and x7F, inclusive. This refers to ASCII symbols and code points. EBCDIC data can use the corresponding symbols, even though the code points will be different.
dumpfile = x x is the fully qualified (according to the server node) name of an exception file to which rejected rows are written. A maximum of 32K of data is written per record. For example,
   db2 load from data of del
      modified by dumpfile = /u/user/filename
      insert into table_name
implieddecimal The location of an implied decimal point is determined by the column definition; it is no longer assumed to be at the end of the value. For example, the value 12345 is loaded into a DECIMAL(8,2) column as 123.45, not 12345.00.
noeofchar The optional end-of-file character x'1A' is not recognized as the end of file. Processing continues as if it were a normal character.
ASC (Non-delimited ASCII) File Format
binarynumerics Numeric (but not DECIMAL) data must be in binary form, not the character representation. This avoids costly conversions.

This option is supported only with positional ASC, using fixed length records specified by the reclen option. The noeofchar option is assumed.

The following rules apply:

  • No conversion between data types is performed, with the exception of INTEGER and SMALLINT.
  • Data lengths must match their target column definitions.
  • FLOATs must be in IEEE Floating Point format.
  • Binary data must be in the binary format of the platform on which the load is performed.
Note:NULLs cannot be present in the data for columns affected by this modifier. Blanks (normally interpreted as NULL) are interpreted as a binary value when this modifier is used.

Regardless of the server platform, the byte order of binary data in the load source file is assumed to be big-endian; that is, when using this modifier on OS/2 or on the Windows operating system, the byte order must not be reversed.

nullindchar=x x is a single character. Changes the character denoting a null value to x. The default value of x is Y.b
packeddecimal Loads packed-decimal data directly, since the binarynumerics modifier does not include the DECIMAL field type.

This option is supported only with positional ASC, using fixed length records specified by the reclen option. The noeofchar option is assumed.

Supported values for the sign nibble are:

   + = 0xC 0xA 0xE 0xF
   - = 0xD 0xB
Note:NULLs cannot be present in the data for columns affected by this modifier. Blanks (normally interpreted as NULL) are interpreted as a binary value when this modifier is used.

Regardless of the server platform, the byte order of binary data in the load source file is assumed to be big-endian; that is, when using this modifier on OS/2 or on the Windows operating system, the byte order must not be reversed.

reclen=x x is an integer with a maximum value of 32 767. x characters are read for each row, and a new-line character is not used to indicate the end of the row.
striptblanks Truncates any trailing blank spaces when loading data into a variable-length field. If this option is not specified, blank spaces are kept.

This option cannot be specified together with striptnulls. These are mutually exclusive options.
Note:This option replaces the obsolete t option, which is supported for back-level compatibility only.

striptnulls Truncates any trailing NULLs (0x00 characters) when loading data into a variable-length field. If this option is not specified, NULLs are kept.

This option cannot be specified together with striptblanks. These are mutually exclusive options.
Note:This option replaces the obsolete padwithzero option, which is supported for back-level compatibility only.

DEL (Delimited ASCII) File Format
chardelx x is a single character string delimiter. The default value is a double quotation mark (") The specified character is used in place of double quotation marks to enclose a character string.ab

The single quotation mark (') can also be specified as a character string delimiter as follows:

   modified by chardel''
coldelx x is a single character column delimiter. The default value is a comma (,). The specified character is used in place of a comma to signal the end of a column.ab
decptx x is a single character substitute for the period as a decimal point character. The default value is a period (.). The specified character is used in place of a period as a decimal point character.ab
IXF File Format
forcein Directs the utility to accept data despite code page mismatches, and to suppress translation between code pages.

Fixed length target fields are checked to verify that they are large enough for the data. If nochecklengths is specified, no checking is done, and an attempt is made to load each row.

Note:
  • a Table 7 lists the characters that can be used as delimiter overrides.
  • b The character must be specified in the code page of the source data.

    The character code point (instead of the character symbol), can be specified using the syntax xJJ or 0xJJ, where JJ is the hexidecimal representation of the code point. For example, to specify the # character as a column delimiter, use one of the following:

       ... modified by coldel# ...
       ... modified by coldel0x23 ...
       ... modified by coldelX23 ...
    

Remote Files

Remote file is a base file name to which DB2 appends different extensions to create files used by other commands (for example, .msg for LOAD QUERY.

The remote file resides on the server machine and is accessed by the DB2 instance exclusively. Therefore, it is imperative that any file name qualification given to this parameter reflects the directory structure of the server, not the client, and that the DB2 instance owner has read and write permission on this file. In addition, the user must ensure that two loads are not issued that have the same fully-qualified remote file name.

There are several ways that the remote file name can be selected and qualified when the user has just given a partially qualified name, or no name at all:

Note:In an MPP system, the remote file must reside on a local disk, not on an NFS mount. If the file is on an NFS mount, there will be a significant performance decrement during the load operation.

See Also

LOAD QUERY


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

[ DB2 List of Books | Search the DB2 Books ]