7-22 IBM Informix OnLine Database Server Administrator’s Guide
How to Create a Command File
Youcan 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 (page7-23)
Character-positionFILE statement (page 7-26)
Character-positionINSERT statement (page 7-28)
Delimiter Form FILE Statement
Thesyntax for the delimiter form of the FILE statement can be represented as
follows:
If the delimiter specified byc 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 ofc were specified as [ , you would need to place a backslash
beforeany literal [that appeared in the input file. Similarly,you must precede
any backslash that appears in the input file with an additional backslash.
TheDELIMITER keyword causes dbload to internally assign the sequential
namesf01,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 associatedINSERT
statement,you must use the f01,f02,f03 format. Refer to page 7-24 to see an
example.
cdefinesthe 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 infilename.
FILE filename DELIMITER cnfields ;