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

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-32
Considerations for import
Two-Digit Year Input Values for Input File
You have the option of specifying a two-digit year date or timestamp value in the [DATE
FORMAT] section of a format file. If you do and the year value is less than 30, import
assumes the first two digits of the year to be 20. If the year value is greater than or
equal to 30, import assumes the first two digits of the year to be 19.
Data Types of Input Values for Input File
import converts the character data in the input file to the appropriate data types as
defined in the target table. The data types of the values in an input record must be
compatible with the data types of the columns in the destination table.
Use the -Z option to specify the character set for the data being imported. import will
import data in a UCS2 input file to any noncharacter-typed column after a
Unicode-to-ISO88591 conversion, and to a character-type column through a
conversion that translates the Unicode data to the character set of the column. import
will directly import UCS2 data to UCS2 columns without conversion.
Format and Data File Requirement for Unicode import
A UCS2 data input file must be in UTF-16BE (UTF-16 big-endian) or UTF-16LE
(UTF-16 little-endian) format. The byte order mark (BOM) must occupy the first two
bytes of the input file.
Because the format file or the import command line is specified in ASCII, the field
delimiter, the field qualifier, or the row delimiter character in a UCS2 input data file must
be the ASCII-equivalent version. For example, the field delimiter ',' (ASCII value 0x2C)
for a Unicode data file must be supplied in Unicode 0x002C.
If the Unicode data file is subjected to a fixed width format importing, the unit for the
start position, the length of input fields in the COL attribute, and the record length in the
RecordLength field in the FIXED width format section is in characters, not in bytes.
If the Unicode data file is subjected to a fixed width format importing, the unit for these
components is characters, not bytes:
start position
length of input fields in the COL attribute
record length in the RecordLength field in the FIXED width format section
Error Reporting for Unicode import
Error messages sent to the console remain in ASCII. If UCS2 data is to be included in
the message, its content is converted first. All UCS2 characters in the range [0x00.
0xFF] are converted to an 8-bit ASCII equivalent. For all other UCS2 characters,
NonStop SQL/MX uses the hexadecimal form of their code values. import inserts a
space before and after the hexadecimal value for readability.
Error rows logged to the error log file are in UCS2, in the same byte order as the
source data file. You can resubmit the log file to import after errors have been
corrected.