IBM 000-8697 User Manual

Page of 702
Utilities
7-23
How to Create a Command File
Two consecutive delimiters define a null field. As a precaution, you might
wish to place a delimiter immediately before the
NEWLINE
 character that
marks the end of each data row. If you omit this delimiter, an error results
whenever the last field of a data row is empty. If you are certain that none of
the input data rows ends with an empty field, you can omit this step.
The following example command file illustrates a simple delimiter form of
the
FILE
 and
INSERT
 statements. The three input data files, stock.unl,
customer.unl
, and manufact.unl (from stores5) were created by the
UNLOAD
statement. (To see the .unl input data files, refer to the directory
$
INFORMIXDIR
/demo/
product_name.)
FILE stock.unl DELIMITER "|" 6;
INSERT INTO stock;
FILE customer.unl DELIMITER "|" 10;
INSERT INTO customer;
FILE manufact.unl DELIMITER "|" 3;
INSERT INTO manufact;
Delimiter Form INSERT Statement
The
INSERT
statement within dbload cannot incorporate a
SELECT
statement.
The user who executes dbload with this command file must have Insert
privilege on the named table. The syntax for the delimiter form of the
INSERT statement can be represented as follows:
Valid syntax for the dbload
VALUES
 clause includes constants, literal
numbers, and functions as described in
IBM I
nformix
G
uide to
SQL: R
eference.
You can also use the sequential field names automatically assigned by
dbload
 (f01f02f03, and so on) from the
FILE
 statement.
column name
is the column that receives the new data.
table name
is the name of the table that receives the data. The table name
can include the owner name but cannot include a database
server name.
,
column
name
INSERT
INTO
;
(
)
Restricted
Values Clause
table name