IBM 000-8697 Server User Manual


 
7-22 IBM Informix OnLine Database Server Administrator’s Guide
How to Create a Command File
You can combine both forms of the FILE statement in a single command file.
For clarity, each statement type and form are described separately in the
sections that follow:
Delimiter form FILE statement (page 7-22)
Delimiter form INSERT statement (page 7-23)
Character-position FILE statement (page 7-26)
Character-position INSERT statement (page 7-28)
Delimiter Form FILE Statement
The syntax for the delimiter form of the FILE statement can be represented as
follows:
If the delimiter specified by c appears anywhere in the input file as a literal
character, it must be preceded with a backslash in the input file. For example,
if the value of c were specified as [, you would need to place a backslash
before any literal [that appeared in the input file. Similarly, you must precede
any backslash that appears in the input file with an additional backslash.
The DELIMITER keyword causes dbload to internally assign the sequential
names f01, f02, f03, ... to fields in the input file. You cannot see these names,
but if you refer to these fields to specify a value list in an associated INSERT
statement, you must use the f01, f02, f03 format. Refer to page 7-24 to see an
example.
c defines the field delimiter for the specific input file specified as
filename.
filename specifies the input file.
nfields is an integer that indicates the number of fields in each data
row contained in filename.
FILE
filename DELIMITER c nfields ;