SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)
SQL/MX Utilities
HP NonStop SQL/MX Release 3.2 Reference Manual—691117-001
5-55
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-54.
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-54.
col=column_name,start,length
[,varcharPrefix_length]
The target table column name and the start
position and length of the input field in each row
of the source data file.
start is a decimal ASCII number that specifies
the byte position of the first character of the field
(where 1, not 0, refers to the first byte of the
input row). length is a decimal ASCII number
that specifies the number of bytes in the field.
For fields whose target is a VARCHAR column,
you can optionally specify the actual length of
the data as a decimal ASCII number (of
characters, not bytes) at the beginning of the
data in the input field. If you do, start must
specify the byte position of the actual length
value and all input rows must use the same
number of characters at the beginning of the
input field to contain the actual length value, and
you must specify the varcharPrefix_length
parameter on the col= line for the column.
If you specify varchar_Prefix_length, it
must be a decimal ASCII number that specifies
the number of characters, not bytes, at the
beginning of the input field data that are used to
contain the actual length value.
If the null or default flag
NullDefault_flag is defined, it precedes
the length prefix (if any) in the input field.
Each field in the source data file must have a
corresponding col= entry. Any of the
record_length number of characters in each
input record that are not covered by a col= entry
will be ignored.










