IBM 000-8697 Manual Do Utilizador

Página de 702
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
)
Delimiter form
INSERT
 statement (
)
Character-position
FILE
 statement (
Character-position
INSERT
 statement (
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 f01f02f03, ... 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 f01f02f03 format. Refer to
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
;