SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Utilities
HP NonStop SQL/MX Reference Manual—544517-008
5-47
Programmatic Interfaces
You might specify the three import commands as:
C:\>import corpcat.persnl.employee -I empfile -C 2999 -T 500
C:\>import corpcat.persnl.employee -I empfile -C 1999 -F 3000
-T 500
C:\>import corpcat.persnl.employee -I empfile -C 1999 -F 5000
-T 500
The number of records for each partition must be less than or equal to the space
available in each partition, and the rows to be imported into each partition must
have an appropriate clustering key. In the preceding example, the first partition
allows for employee numbers ranging from 0 to 2999.
•
Run multiple instances of the import utility—one for each partition in the
destination table—to load data into a partitioned table by using a separate input file
for each partition. Each of the input files contains the data for each partition.
For example, you might specify the three import commands for the partitioned
EMPLOYEE table as:
C:\>import corpcat.persnl.employee -I empfile1 -T 500
C:\>import corpcat.persnl.employee -I empfile2 -T 500
C:\>import corpcat.persnl.employee -I empfile3 -T 500
Programmatic Interfaces
Exit Status Code Handling
import sets the exit status code to 0, only if it successfully imports all the specified
rows from the input file into the target table. (Complete success).
import sets the exit status code to 10, if it attempts to import all specified rows from
the input file, encounters one or more ignorable errors (parsing or execution errors),
does not encounter any non-ignorable errors, and does not exceed any error threshold.
(A qualified success).
import sets the exit status code to 20, if one or more rows are successfully imported,
but it encounters a non-ignorable error or exceeds an error threshold. (Some success,
but a serious problem encountered).
Note. Check that the ranges specified are exact (for example, no gaps or omissions and
no overlap of rows).
Note. In Release 2.0, under these conditions,
import wrote a message to Stdout
displaying "Import Completed Successfully". For Release 2.X, under these conditions,
import will write the same message to Stdout.
Note. In Release 2.0, when
import reached the end of all specified rows and encountered
only ignorable errors, Import wrote a message to Stdout displaying "Import Completed
Successfully". For Release 2.X, under these conditions, import will instead write a message
displaying "Import Completed with some non-fatal errors"










