SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-29
Considerations for import
Format File Considerations–import
Format File for a DELIM Input File
If the input file type is DELIM and you want to use a format file, you must include the
[COLUMN FORMAT] section. The other sections are optional. See [COLUMN
FORMAT] on page 5-27.
Format File for a FIXED Input File
If the input file type is FIXED, you must specify a format file that includes the
[COLUMN FORMAT] and [FIXED WIDTH FORMAT] sections. The columns listed in
the [COLUMN FORMAT] section must match the columns listed in the [FIXED WIDTH
FORMAT] section. The other sections are optional. See [FIXED WIDTH FORMAT] on
page 5-27.
Input File Considerations–import
Fixed Input File
In a fixed input file, specified by using the -W FIXED option, different columns might
have different lengths, but for each column, all rows must be the same length. You
should pad column values that are shorter than the column width with spaces or
NullValue characters to ensure that every row has exactly the same number of bytes
for a given column.
Delimited Input File
A delimited input file, specified by using the -W DELIM option or by default, uses field
and row delimiters and field qualifiers if needed. If you specify a format file, import
uses the delimiters in the file.
If you do not specify a format file, import uses these default delimiters:
This example shows a row from a delimited file with default coding and field qualifiers:
"135","Jane Jackson","100 East St.","Cupertino","CA","95014"
You are not required to use field qualifiers. In this record, the fields are correctly
delimited by a comma(,), and field qualifiers are not needed:
135,Jane Jackson,100 East St.,Cupertino,CA,95014
Using a Field Qualifier
Field delimiter One or more characters used to separate fields in a row or
record. The default is a comma (,).
Row or record
delimiter
One or more characters used to separate rows or records. The
default is the new line character (\n).
Field qualifier A character used to enclose a field of a row (or record). The
default is a double quotation mark(").