When loading data to a table containing LOB columns, if you use LOB column input files, you can use the lobcolumn statement to specify the file information.
- Criteria
- Specify the lobcolumn statement to use a LOB column input file to load data to a table with LOB columns.
- A LOB column input file is created, for example, when data is migrated from another database using a program.
- Rules
- You can specify the lobcolumn statement only when you also specify the -k c option.
- If the table to be loaded contains multiple LOB columns, you need to create the lobcolumn statement for each column. However, when loading LOB columns by RDAREA, you need only one lobcolumn statement.
If the input data file of the LOB column structure base table is in DAT format and not all the columns are specified in this file, but only the corresponding columns are specified in the column structure information file, then you can omit the lobcolumn statement for those LOB columns that are not specified. In this case, the lobcolumn statement, if specified, is ignored, and the KFPL16325-W message is issued. The system then creates the LOB specified data as null values or default values, depending on the LOB column specification made during the table definition.
- There is no need to specify the lobcolumn statement when loading data only for the LOB column structure base table.
- You cannot specify the lobcolumn statement for a table that contains columns of abstract data type.
- If the target table contains no LOB column, do not specify the lobcolumn statement.
- Organization of this subsection
- (1) Format
- (2) Explanation
(a) LOB-column-name
Specifies the name of a LOB column in the table subject to data loading.
You can omit this operand if there is only one LOB column or the LOB columns are to be loaded in units of RDAREAs.
- Rules
- If the table contains multiple LOB columns, be sure to specify this operand.
- The system treats a LOB column name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose a LOB column name in double quotation marks if it contains a space.
(b) LOB-column-input-filename [,LOB-column-input-filename]...
~<pathname>
Specifies the names of the LOB column input files.
Specify each file name in such a manner that it results in the absolute pathname when combined with the directory name specified with the lobdata statement. If you omit the directory name in the lobdata statement, specify the absolute pathnames in this operand.
- Rules
- The maximum length of the file name for a LOB column input file is 1,023 characters.
- When specifying multiple file names, make sure that each file name corresponds to the right column in the input data file for the LOB column structure base table.
- If a file is created in EasyMT, specify only the file name used in EasyMT.
- Place the LOB column input files at the following location:
- HiRDB single server configuration
- Place the LOB column input files at the host of the single server or the utility special unit. To specify the host name, use the lobmid statement.
- HiRDB parallel server configuration
- Place the LOB column input files at the front-end server or a back-end server. To specify the server name, use the lobmid statement.