SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
Data to Input
The input file, COINPUT_FX2, contains records like this:
0123456789012345
ABCDEFGHIJKLMNPQ
0123456789012345
Note that there are three hidden spaces and a newline character at the end of each line.
Format File Describing the Data
Create a format file, FORMFILE3, which consists of [DATE FORMAT], [COLUMN FORMAT], and
[FIXED WIDTH FORMAT] sections:
[DATE FORMAT]
NormalizeDate = y
[COLUMN FORMAT]
col=col1
[FIXED WIDTH FORMAT]
FileIsBinary=N
RecordLength =5
col=col1,1,5
import Load Command
This import command imports data into the target table TABLE_2 from the delimited input file
COINPUT_FX3 using the format file FORMFILE3:
import cat.sch.table_2 -I coinput_fx2 -U formfile3 -W FIXED
Example 4: How to use new options and analyze the output files
This example describes how to use new options and analyze the output files. It shows how to create
the table, the data to be entered (the input data file), and the output files.
create table cat.sch.Xample ( C1 int NOT NULL PRIMARY KEY ,C2
char(8) NOT NULL,CONSTRAINT cnd1 CHECK (c1 > 5) );
Data to Input
The input file, X.in, contains records like this:
11,12345678
A8,22345678
11,82345678
14,423456789
17,52345678,9
15,62345678
27,72345678
5,32345678
BZ,XYZ
55,12345678
After executing the command:
import cat.sch.Xample -i X.in -L 50 -E X.perrs -PM X.perrmsg \
XL 5 -XE X.xerrs -XM X.xerrmsg \ -SF X.sum -SI 10
The following output must be displayed:
NonStop SQL/MX Import Utility 2.3
(c) Copyright 2007 Hewlett-Packard Development Company, LP.
Rows Imported = 4
Import Completed with some non-fatal errors
A select statement on the table will show the following:
Using import to Load SQL/MX Tables 201