The PC version of IXF (PC/IXF) file format is a database manager adaptation of the Integration Exchange Format (IXF) data interchange architecture. The IXF architecture was specifically designed to enable the exchange of relational database structures and data. The PC/IXF architecture allows the database manager to export a database without having to anticipate the requirements and idiosyncrasies of a receiving product. Similarly, a product importing a PC/IXF file need only understand the PC/IXF architecture; the characteristics of the product which exported the file are not relevant. The PC/IXF file architecture maintains the independence of both the exporting and the importing database systems.
The IXF architecture is a generic relational database exchange format that supports a rich set of relational data types, including some types that may not be supported by specific relational database products. The PC/IXF file format preserves this flexibility; for example, the PC/IXF architecture supports both single-byte character string (SBCS) and double-byte character string (DBCS) data types. Not all implementations support all PC/IXF data types; however, even restricted implementations provide for the detection and disposition of unsupported data types during import.
In general, a PC/IXF file consists of an unbroken sequence of variable-length records. The file contains the following record types in the order shown:
A PC/IXF file may also contain application records of record type A, anywhere after the H record. These records are permitted in PC/IXF files to enable an application to include additional data, not defined by the PC/IXF format, in a PC/IXF file. A records are ignored by any program reading a PC/IXF file that does not have particular knowledge about the data format and content implied by the application identifier in the A record.
Every record in a PC/IXF file begins with a record length indicator. This is a 6-byte right justified character representation of an integer value specifying the length, in bytes, of the portion of the PC/IXF record that follows the record length indicator; that is, the total record size minus 6 bytes. Programs reading PC/IXF files should use these record lengths to locate the end of the current record and the beginning of the next record. H, T, and C records must be sufficiently large to include all of their defined fields, and, of course, their record length fields must agree with their actual lengths. However, if extra data (for example, a new field), is added to the end of one of these records, pre-existing programs reading PC/IXF files should ignore the extra data, and generate no more than a warning message. Programs writing PC/IXF files, however, should write H, T and C records that are the precise length needed to contain all of the defined fields.
PC/IXF file records are composed of fields which contain character data. The import and export utilities interpret this character data using the CPGID of the target database, with two exceptions:
The code page environment of character data contained in an IXFADATA field is established by the application which creates and processes a particular A record; that is, the environment varies by implementation.
The code page environment of character data contained in an IXFDCOLS field is a function of information contained in the C record which defines a particular column and its data.
Numeric fields in H, T, and C records, and in the prefix portion of D and A records should be right justified single-byte character representations of integer values, filled with leading zeros or blanks. A value of zero should be indicated with at least one (right justified) zero character, not blanks. Whenever one of these numeric fields is not used, for example IXFCLENG, where the length is implied by the data type, it should be filled with blanks. These numeric fields are:
IXFHRECL, IXFTRECL, IXFCRECL, IXFDRECL, IXFARECL, IXFHHCNT, IXFHSBCP, IXFHDBCP, IXFTCCNT, IXFTNAML, IXFCLENG, IXFCDRID, IXFCPOSN, IXFCNAML, IXFCTYPE, IXFCSBCP, IXFCDBCP, IXFCNDIM, IXFCDSIZ, IXFDRID
Note: | The database manager PC/IXF file format is not identical to the System/370 IXF format (see Differences between Version 1 PC/IXF and Version 0 System/370 IXF). |
There are five PC/IXF record types:
Each PC/IXF record type is defined as a sequence of fields; these fields are required, and must appear in the order shown.
HEADER RECORD FIELD NAME LENGTH TYPE COMMENTS ---------- ------- --------- ------------- IXFHRECL 06-BYTE CHARACTER record length IXFHRECT 01-BYTE CHARACTER record type = 'H' IXFHID 03-BYTE CHARACTER IXF identifier IXFHVERS 04-BYTE CHARACTER IXF version IXFHPROD 12-BYTE CHARACTER product IXFHDATE 08-BYTE CHARACTER date written IXFHTIME 06-BYTE CHARACTER time written IXFHHCNT 05-BYTE CHARACTER heading record count IXFHSBCP 05-BYTE CHARACTER single byte code page IXFHDBCP 05-BYTE CHARACTER double byte code page IXFHFIL1 02-BYTE CHARACTER reserved |
The following fields are contained in the header record:
The export utility sets this field equal to the SBCS CPGID of the exported database table. For example, if the table SBCS CPGID is 850, this field contains '00850'.
The export utility sets this field equal to the DBCS CPGID of the exported database table. For example, if the table DBCS CPGID is 301, this field contains '00301'.
TABLE RECORD FIELD NAME LENGTH TYPE COMMENTS ---------- ------- --------- ------------- IXFTRECL 06-BYTE CHARACTER record length IXFTRECT 01-BYTE CHARACTER record type = 'T' IXFTNAML 03-BYTE CHARACTER name length IXFTNAME 128-BYTE CHARACTER name of data IXFTQUAL 128-BYTE CHARACTER qualifier IXFTSRC 12-BYTE CHARACTER data source IXFTDATA 01-BYTE CHARACTER data convention = 'C' IXFTFORM 01-BYTE CHARACTER data format = 'M' IXFTMFRM 05-BYTE CHARACTER machine format='PC' IXFTLOC 01-BYTE CHARACTER data location = 'I' IXFTCCNT 05-BYTE CHARACTER 'C' record count IXFTFIL1 02-BYTE CHARACTER reserved IXFTDESC 30-BYTE CHARACTER data description |
The following fields are contained in the table record:
COLUMN DESCRIPTOR RECORD FIELD NAME LENGTH TYPE COMMENTS ---------- ------- --------- ------------- IXFCRECL 06-BYTE CHARACTER record length IXFCRECT 01-BYTE CHARACTER record type = 'C' IXFCNAML 03-BYTE CHARACTER column name length IXFCNAME 30-BYTE CHARACTER column name IXFCNULL 01-BYTE CHARACTER column allows nulls IXFCSLCT 01-BYTE CHARACTER column selected flag IXFCKEY 01-BYTE CHARACTER key column flag IXFCCLAS 01-BYTE CHARACTER data class IXFCTYPE 03-BYTE CHARACTER data type IXFCSBCP 05-BYTE CHARACTER single byte code page IXFCDBCP 05-BYTE CHARACTER double byte code page IXFCLENG 05-BYTE CHARACTER column data length IXFCDRID 03-BYTE CHARACTER 'D' record identifier IXFCPOSN 06-BYTE CHARACTER column position IXFCDESC 30-BYTE CHARACTER column description IXFCNDIM 02-BYTE CHARACTER number of dimensions IXFCDSIZ varying CHARACTER size of each dimension |
The following fields are contained in column descriptor records:
The semantics of this field vary with the data type for the column (specified in the IXFCTYPE field).
See also Table 12.
The semantics of this field vary with the data type for the column (specified in the IXFCTYPE field).
See also Table 12.
the export utility will put NOT NULL WITH DEFAULT in this field, and when the import utility creates a new table with this file, it will create it as not null with default.
DATA RECORD FIELD NAME LENGTH TYPE COMMENTS ---------- ------- --------- ------------- IXFDRECL 06-BYTE CHARACTER record length IXFDRECT 01-BYTE CHARACTER record type = 'D' IXFDRID 03-BYTE CHARACTER 'D' record identifier IXFDFIL1 04-BYTE CHARACTER reserved IXFDCOLS varying variable columnar data |
The following fields are contained in the data records:
The format of the column entry data depends on whether or not the column is nullable:
For varying-length data types, the data type-specific information includes a current length indicator. The current length indicators are 2-byte integers in a form specified by the IXFTMFRM field.
The length of the data area of a D record may not exceed 32 771 bytes.
APPLICATION RECORD FIELD NAME LENGTH TYPE COMMENTS ---------- ------- --------- ------------- IXFARECL 06-BYTE CHARACTER record length IXFARECT 01-BYTE CHARACTER record type = 'A' IXFAPPID 12-BYTE CHARACTER application identifier IXFADATA varying variable application-specific data |
The following fields are contained in application records:
Name | IXFCTYPE Value | Description |
---|---|---|
BIGINT | 492 | An 8-byte integer in the form specified by IXFTMFRM. It represents a whole number between -9 223 372 036 854 775 808 and 9 223 372 036 854 775 807. IXFCSBCP and IXFCDBCP are not significant , and should be zero. IXFCLENG is not used, and should contain blanks. |
BLOB, CLOB | 404, 408 | A variable-length character string. The maximum length of the
string is contained in the IXFCLENG field of the column descriptor record, and
cannot exceed 32 767 bytes. The string itself is preceded by
a current length indicator, which is a 4-byte integer specifying the length of
the string, in bytes. The string is in the code page indicated by
IXFCSBCP.
The following applies to BLOBs only: If IXFCSBCP is zero, the string is bit data, and should not be translated by any transformation program. The following applies to CLOBs only: If IXFCDBCP is nonzero, the string can also contain double-byte characters in the code page indicated by IXFCDBCP. |
BLOB_FILE, CLOB_FILE, DBCLOB_FILE | 804, 808, 812 | A fixed-length field containing an SQLFILE structure with the
name_length and the name fields filled in. The
length of the structure is contained in the IXFCLENG field of the column
descriptor record, and cannot exceed 255 bytes. The file name is in the
code page indicated by IXFCSBCP. If IXFCDBCP is nonzero, the file name
can also contain double-byte characters in the code page indicated by
IXFCDBCP. If IXFCSBCP is zero, the file name is bit data and should not
be translated by any transformation program.
Since the length of the structure is stored in IXFCLENG, the actual length of the original LOB is lost. IXF files with columns of type BLOB_FILE, CLOB_FILE, or DBCLOB_FILE should not be used to recreate the LOB field, since the LOB will be created with a length of sql_lobfile_len. |
CHAR | 452 | A fixed-length character string. The string length is contained in the IXFCLENG field of the column descriptor record, and cannot exceed 254 bytes. The string is in the code page indicated by IXFCSBCP. If IXFCDBCP is nonzero, the string can also contain double-byte characters in the code page indicated by IXFCDBCP. If IXFCSBCP is zero, the string is bit data and should not be translated by any transformation program. |
DATE | 384 | A point in time in accordance with the Gregorian calendar. Each date is a 10-byte character string in International Standards Organization (ISO) format: yyyy-mm-dd. The range of the year part is 0001 to 9999. The range of the month part is 01 to 12. The range of the day part is 01 to n, where n depends on the month, using the usual rules for days of the month and leap year. Leading zeros cannot be omitted from any part. IXFCLENG is not used, and should contain blanks. Valid characters within DATE are invariant in all PC ASCII code pages; therefore, IXFCSBCP and IXFCDBCP are not significant, and should be zero. |
DBCLOB | 412 | A variable-length string of double-byte characters. The IXFCLENG field in the column descriptor record specifies the maximum number of double-byte characters in the string, and cannot exceed 16 383. The string itself is preceded by a current length indicator, which is a 4-byte integer specifying the length of the string in double-byte characters (that is, the value of this integer is one half the length of the string, in bytes). The string is in the DBCS code page, as specified by IXFCDBCP in the C record. Since the string consists of double-byte character data only, IXFCSBCP should be zero. There are no surrounding shift-in or shift-out characters. |
DECIMAL | 484 | A packed decimal number with precision P (as specified by the first three bytes of IXFCLENG in the column descriptor record) and scale S (as specified by the last two bytes of IXFCLENG). The length, in bytes, of a packed decimal number is (P+2)/2. The precision must be an odd number between 1 and 31, inclusive. The packed decimal number is in the internal format specified by IXFTMFRM, where packed decimal for the PC is defined to be the same as packed decimal for the System/370. IXFCSBCP and IXFCDBCP are not significant, and should be zero. |
FLOATING POINT | 480 | Either a long (8-byte) or short (4-byte) floating point number, depending on whether IXFCLENG is set to eight or to four. The data is in the internal machine form, as specified by IXFTMFRM. IXFCSBCP and IXFCDBCP are not significant, and should be zero. Four-byte floating point is not supported by the database manager. |
GRAPHIC | 468 | A fixed-length string of double-byte characters. The IXFCLENG field in the column descriptor record specifies the number of double-byte characters in the string, and cannot exceed 127. The actual length of the string is twice the value of the IXFCLENG field, in bytes. The string is in the DBCS code page, as specified by IXFCDBCP in the C record. Since the string consists of double-byte character data only, IXFCSBCP should be zero. There are no surrounding shift-in or shift-out characters. |
INTEGER | 496 | A 4-byte integer in the form specified by IXFTMFRM. It represents a whole number between -2 147 483 648 and +2 147 483 647. IXFCSBCP and IXFCDBCP are not significant, and should be zero. IXFCLENG is not used, and should contain blanks. |
LONGVARCHAR | 456 | A variable-length character string. The maximum length of the string is contained in the IXFCLENG field of the column descriptor record, and cannot exceed 32 767 bytes. The string itself is preceded by a current length indicator, which is a 2-byte integer specifying the length of the string, in bytes. The string is in the code page indicated by IXFCSBCP. If IXFCDBCP is nonzero, the string can also contain double-byte characters in the code page indicated by IXFCDBCP. If IXFCSBCP is zero, the string is bit data and should not be translated by any transformation program. |
LONG VARGRAPHIC | 472 | A variable-length string of double-byte characters. The IXFCLENG field in the column descriptor record specifies the maximum number of double-byte characters for the string, and cannot exceed 16 383. The string itself is preceded by a current length indicator, which is a 2-byte integer specifying the length of the string in double-byte characters (that is, the value of this integer is one half the length of the string, in bytes). The string is in the DBCS code page, as specified by IXFCDBCP in the C record. Since the string consists of double-byte character data only, IXFCSBCP should be zero. There are no surrounding shift-in or shift-out characters. |
SMALLINT | 500 | A 2-byte integer in the form specified by IXFTMFRM. It represents a whole number between -32 768 and +32 767. IXFCSBCP and IXFCDBCP are not significant, and should be zero. IXFCLENG is not used, and should contain blanks. |
TIME | 388 | A point in time in accordance with the 24-hour clock. Each time is an 8-byte character string in ISO format: hh.mm.ss. The range of the hour part is 00 to 24, and the range of the other parts is 00 to 59. If the hour is 24, the other parts are 00. The smallest time is 00.00.00, and the largest is 24.00.00. Leading zeros cannot be omitted from any part. IXFCLENG is not used, and should contain blanks. Valid characters within TIME are invariant in all PC ASCII code pages; therefore, IXFCSBCP and IXFCDBCP are not significant, and should be zero. |
TIMESTAMP | 392 | The date and time with microsecond precision. Each time stamp is a character string of the form yyyy-mm-dd-hh.mm.ss.nnnnnn (year month day hour minutes seconds microseconds). IXFCLENG is not used, and should contain blanks. Valid characters within TIMESTAMP are invariant in all PC ASCII code pages; therefore, IXFCSBCP and IXFCDBCP are not significant, and should be zero. |
VARCHAR | 448 | A variable-length character string. The maximum length of the string, in bytes, is contained in the IXFCLENG field of the column descriptor record, and cannot exceed 254 bytes. The string itself is preceded by a current length indicator, which is a two-byte integer specifying the length of the string, in bytes. The string is in the code page indicated by IXFCSBCP. If IXFCDBCP is nonzero, the string can also contain double-byte characters in the code page indicated by IXFCDBCP. If IXFCSBCP is zero, the string is bit data and should not be translated by any transformation program. |
VARGRAPHIC | 464 | A variable-length string of double-byte characters. The IXFCLENG field in the column descriptor record specifies the maximum number of double-byte characters in the string, and cannot exceed 127. The string itself is preceded by a current length indicator, which is a 2-byte integer specifying the length of the string in double-byte characters (that is, the value of this integer is one half the length of the string, in bytes). The string is in the DBCS code page, as specified by IXFCDBCP in the C record. Since the string consists of double-byte character data only, IXFCSBCP should be zero. There are no surrounding shift-in or shift-out characters. |
Not all combinations of IXFCSBCP and IXFCDBCP values for PC/IXF character
or graphic columns are valid. A PC/IXF character or graphic column with
an invalid (IXFCSBCP,IXFCDBCP) combination is an invalid data type.
Table 12. Valid PC/IXF Data Types
PC/IXF Data Type | Valid (IXFCSBCP,IXFCDBCP) Pairs | Invalid (IXFCSBCP,IXFCDBCP) Pairs | ||
---|---|---|---|---|
CHAR, VARCHAR, or LONG VARCHAR | (0,0), (x,0), or (x,y) | (0,y) | ||
BLOB | (0,0) | (x,0), (0,y), or (x,y) | ||
CLOB | (x,0), (x,y) | (0,0), (0,y) | ||
GRAPHIC, VARGRAPHIC, LONG VARGRAPHIC, or DBCLOB | (0,y) | (0,0), (x,0), or (x,y) | ||
|
Table 13. Acceptable Data Type Forms for the PC/IXF File Format
Data Type | Form in Files Created by the Export Utility | Form Acceptable to the Import Utility |
---|---|---|
BIGINT | A BIGINT column, identical to the database column, is created. | A column in any numeric type (SMALLINT, INTEGER, BIGINT, DECIMAL, or FLOAT) is accepted. Individual values are rejected if they are not in the range -9 223 372 036 854 775 808 to 9 223 372 036 854 775 807. |
BLOB | A PC/IXF BLOB column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF CHAR, VARCHAR, LONG VARCHAR, BLOB, or BLOB_FILE column is
acceptable if:
|
CHAR | A PC/IXF CHAR column is created. The database column length, the SBCS CPGID value, and the DBCS CPGID value are copied to the PC/IXF column descriptor record. | A PC/IXF CHAR, VARCHAR, or LONG VARCHAR column is acceptable if:
A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is also acceptable if the database column is marked FOR BIT DATA. In any case, if the PC/IXF column is of fixed length, its length must be compatible with the length of the database column. The data is padded on the right with single-byte spaces (x'20'), if necessary. See also the FORCEIN Option. |
CLOB | A PC/IXF CLOB column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF CHAR, VARCHAR, LONG VARCHAR, CLOB, or CLOB_FILE column is acceptable if the PC/IXF column single-byte code page value equals the SBCS CPGID of the database column, and the PC/IXF column double-byte code page value equals zero, or the DBCS CPGID of the database column. If the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
DATE | A DATE column, identical to the database column, is created. | A PC/IXF column of type DATE is the usual input. The import utility also attempts to accept columns in any of the character types, except those with incompatible lengths. The character column in the PC/IXF file must contain dates in a format consistent with the country code of the target database. |
DBCLOB | A PC/IXF DBCLOB column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF GRAPHIC, VARGRAPHIC, LONG VARGRAPHIC, DBCLOB, or DBCLOB_FILE column is acceptable if the PC/IXF column double-byte code page value equals that of the database column. If the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
DECIMAL | A DECIMAL column, identical to the database column, is created. The precision and scale of the column is stored in the column descriptor record. | A column in any numeric type (SMALLINT, INTEGER, BIGINT, DECIMAL, or FLOAT) is accepted. Individual values are rejected if they are not in the range of the DECIMAL column into which they are being imported. |
FLOAT | A FLOAT column, identical to the database column, is created. | A column in any numeric type (SMALLINT, INTEGER, BIGINT, DECIMAL, or FLOAT) is accepted. All values are within range. |
GRAPHIC (DBCS only) | A PC/IXF GRAPHIC column is created. The database column length, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is acceptable if the PC/IXF column double-byte code page value equals that of the database column. If the PC/IXF column is of fixed length, its length must be compatible with the database column length. The data is padded on the right with double-byte spaces (x'8140'), if necessary. See also the FORCEIN Option. |
INTEGER | An INTEGER column, identical to the database column, is created. | A column in any numeric type (SMALLINT, INTEGER, BIGINT, DECIMAL, or FLOAT) is accepted. Individual values are rejected if they are not in the range -2 147 483 648 to 2 147 483 647. |
LONG VARCHAR | A PC/IXF LONG VARCHAR column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF CHAR, VARCHAR, or LONG VARCHAR column is acceptable if:
A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is also acceptable if the database column is marked FOR BIT DATA. In any case, if the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
LONG VARGRAPHIC (DBCS only) | A PC/IXF LONG VARGRAPHIC column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is acceptable if the PC/IXF column double-byte code page value equals that of the database column. If the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
SMALLINT | A SMALLINT column, identical to the database column, is created. | A column in any numeric type (SMALLINT, INTEGER, BIGINT, DECIMAL, or FLOAT) is accepted. Individual values are rejected if they are not in the range -32 768 to 32 767. |
TIME | A TIME column, identical to the database column, is created. | A PC/IXF column of type TIME is the usual input. The import utility also attempts to accept columns in any of the character types, except those with incompatible lengths. The character column in the PC/IXF file must contain time data in a format consistent with the country code of the target database. |
TIMESTAMP | A TIMESTAMP column, identical to the database column, is created. | A PC/IXF column of type TIMESTAMP is the usual input. The import utility also attempts to accept columns in any of the character types, except those with incompatible lengths. The character column in the PC/IXF file must contain data in the input format for time stamps. |
VARCHAR | If the maximum length of the database column is <= 254, a PC/IXF VARCHAR column is created. If the maximum length of the database column is > 254, a PC/IXF LONG VARCHAR column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF CHAR, VARCHAR, or LONG VARCHAR column is acceptable if:
A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is also acceptable if the database column is marked FOR BIT DATA. In any case, if the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
VARGRAPHIC (DBCS only) | If the maximum length of the database column is <= 127, a PC/IXF VARGRAPHIC column is created. If the maximum length of the database column is > 127, a PC/IXF LONG VARGRAPHIC column is created. The maximum length of the database column, the SBCS CPGID value, and the DBCS CPGID value are copied to the column descriptor record. | A PC/IXF GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC column is acceptable if the PC/IXF column double-byte code page value equals that of the database column. If the PC/IXF column is of fixed length, its length must be compatible with the maximum length of the database column. See also the FORCEIN Option. |
The database manager import utility applies the following general rules when importing a PC/IXF file in either an SBCS or a DBCS environment:
Import of a PC/IXF file into a new table is specified by the CREATE or the REPLACE_CREATE keywords in the IMPORT command. If a PC/IXF column of an invalid data type (valid data types are defined in PC/IXF Data Types) is selected for import into a new table, the import utility terminates. The entire PC/IXF file is rejected, no table is created, and no data is imported.
Import of a PC/IXF file into an existing table is specified by the INSERT, the INSERT_UPDATE, or the REPLACE_CREATE keywords in the IMPORT command. If a PC/IXF column of an invalid data type is selected for import into an existing table, one of two actions is possible:
If, during import to a new database table, a PC/IXF column is selected that is incompatible with the target database column, the import utility terminates. The entire PC/IXF file is rejected, no table is created, and no data is imported.
Note: | The IMPORT FORCEIN Option extends the scope of compatible columns. |
If, during import to an existing database table, a PC/IXF column is selected that is incompatible with the target database column, one of two actions is possible:
Note: | The IMPORT FORCEIN Option extends the scope of compatible columns. |
If, during import, a PC/IXF column value is encountered that is not valid for the target database column, the import utility rejects the values of all columns in the PC/IXF row that contains the invalid value (the entire row is rejected), and processing continues with the next PC/IXF row.
If the client machine does not have the appropriate conversion files, they can be copied from a server machine to the sqllib\conv directory on the client machine. Be sure to copy the files from a compatible platform; for example, if the client is running on a UNIX based operating system, copy the files from a server that is also running on a UNIX based operating system.
If IXFCSBCP is not zero, the value of IXFCDBCP must equal either zero or the DBCS CPGID of the target database column.
If either of these conditions is not satisfied, the PC/IXF and database columns are incompatible.
When importing a valid PC/IXF character column into a new database table, the value of IXFCSBCP must equal either zero or the SBCS CPGID of the database, or there must be a conversion table. If IXFCSBCP is zero, IXFCDBCP must also be zero (otherwise the PC/IXF column is an invalid data type); IMPORT creates a character column marked FOR BIT DATA in the new table. If IXFCSBCP is not zero, and equals the SBCS CPGID of the database, the value of IXFCDBCP must equal either zero or the DBCS CPGID of the database; in this case, the utility creates a character column in the new table with SBCS and DBCS CPGID values equal to those of the database. If these conditions are not satisfied, the PC/IXF and database columns are incompatible.
The FORCEIN Option can be used to override code page equality checks. However, a PC/IXF character column with IXFCSBCP equal to zero and IXFCDBCP not equal to zero is an invalid data type, and cannot be imported, even if FORCEIN is specified.
When importing a valid PC/IXF graphic column into a database graphic column, the value of IXFCDBCP must equal the DBCS CPGID of the target database column (that is, the double-byte code pages of the two columns must agree).
Table 14 summarizes PC/IXF file import into new or existing database
tables without the FORCEIN option.
Table 14. Summary of PC/IXF File Import without FORCEIN Option
PC/IXF COLUMN DATA TYPE | DATABASE COLUMN DATA TYPE | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
NUMERIC | CHARACTER | GRAPH | DATETIME | |||||||||
SMALL INT | INT | BIGINT | DEC | FLT | (0,0) | (SBCS, 0)d | (SBCS, DBCS)b | b | DATE | TIME | TIME STAMP | |
Numeric | ||||||||||||
-SMALLINT | N |
|
|
|
|
|
|
|
|
|
|
|
| E | E | E | Ea | E |
|
|
|
|
|
|
|
-INTEGER |
| N |
|
|
|
|
|
|
|
|
|
|
| Ea | E | E | Ea | E |
|
|
|
|
|
|
|
-BIGINT |
|
| N |
|
|
|
|
|
|
|
|
|
| Ea | Ea | E | Ea | E |
|
|
|
|
|
|
|
-DECIMAL |
|
|
| N |
|
|
|
|
|
|
|
|
| Ea | Ea | Ea | Ea | E |
|
|
|
|
|
|
|
-FLOAT |
|
|
|
| N |
|
|
|
|
|
|
|
| Ea | Ea | Ea | Ea | E |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Character | ||||||||||||
-(0,0) |
|
|
|
|
| N |
|
|
|
|
|
|
|
|
|
|
|
| E |
|
|
| Ec | Ec | Ec |
-(SBCS,0) |
|
|
|
|
|
| N | N |
|
|
|
|
|
|
|
|
|
| E | E | E |
| Ec | Ec | Ec |
-(SBCS, DBCS) |
|
|
|
|
|
|
| N |
| Ec | Ec | Ec |
|
|
|
|
|
| E |
| E |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Graphic | ||||||||||||
|
|
|
|
|
|
|
|
| N |
|
|
|
|
|
|
|
|
| E |
|
| E |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Datetime | ||||||||||||
-DATE |
|
|
|
|
|
|
|
|
| N |
|
|
|
|
|
|
|
|
|
|
|
| E |
|
|
-TIME |
|
|
|
|
|
|
|
|
|
| N |
|
|
|
|
|
|
|
|
|
|
|
| E |
|
-TIME STAMP |
|
|
|
|
|
|
|
|
|
|
| N |
|
|
|
|
|
|
|
|
|
|
|
| E |
Notes:
a Individual values are rejected if they are out of range for the target numeric data type. b Data type is available only in DBCS environments. c Individual values are rejected if they are not valid date or time values. d Data type is not available in DBCS environments.
|
The FORCEIN option permits import of a PC/IXF file despite code page differences between data in the PC/IXF file and the target database. It offers additional flexibility in the definition of compatible columns.
The following general semantics apply when using the FORCEIN option in either an SBCS or a DBCS environment:
The following code page semantics apply when using the FORCEIN option in either an SBCS or a DBCS environment:
This rule applies to code page comparisons at the column level and at the file level as well, when importing to a new or an existing database table. At the column (for example, data type) level, this rule applies only to the following database manager and PC/IXF data types: character (CHAR, VARCHAR, and LONG VARCHAR), and graphic (GRAPHIC, VARGRAPHIC, and LONG VARGRAPHIC). The restriction follows from the fact that code page attributes of other data types are not relevant to the interpretation of data type values.
For example, the database manager allows a CHAR column to be declared with the FOR BIT DATA attribute. Such a declaration sets both the SBCS CPGID and the DBCS CPGID of the column to zero; it is the zero value of these CPGIDs that identifies the column values as bit strings (rather than character strings).
Values of data types that are sensitive to the FORCEIN option are copied "as is". No code point mappings are employed to account for a change of code page environments. Padding of the imported value with spaces may be necessary in the case of fixed length target columns.
This rule applies whether or not the FORCEIN option is used. The database manager does not permit changes to a database or a column code page value once a database is created.
Consider a PC/IXF CHAR column with IXFCSBCP = '00897' and IXFCDBCP = '00301'. This column is to be imported into a database CHAR column whose SBCS CPGID = '00850' and DBCS CPGID = '00000'. Without FORCEIN, the utility terminates, and no data is imported, or the PC/IXF column values are ignored, and the database column contains NULLs (if the database column is nullable). With FORCEIN, the utility proceeds, ignoring code page incompatibilities. If there are no other data type incompatibilities (such as length, for example), the values of the PC/IXF column are imported "as is", and become available for interpretation under the database column code page environment.
The following table shows:
Table 15. Summary of Import Utility Code Page Semantics (New Table)
This table assumes there is no conversion table between a and x. If there were, items 3 and 4 would work successfully without the FORCEIN option. | ||
CODE PAGE ATTRIBUTES of PC/IXF DATA TYPE | CODE PAGE ATTRIBUTES OF DATABASE TABLE COLUMN | |
---|---|---|
Without FORCEIN | With FORCEIN | |
SBCS | ||
(0,0) | (0,0) | (0,0) |
(a,0) | (a,0) | (a,0) |
(x,0) | reject | (a,0) |
(x,y) | reject | (a,0) |
(a,y) | reject | (a,0) |
(0,y) | reject | (0,0) |
DBCS | ||
(0,0) | (0,0) | (0,0) |
(a,0) | (a,b) | (a,b) |
(x,0) | reject | (a,b) |
(a,b) | (a,b) | (a,b) |
(x,y) | reject | (a,b) |
(a,y) | reject | (a,b) |
(x,b) | reject | (a,b) |
(0,b) | (-,b) | (-,b) |
(0,y) | reject | (-,b) |
Notes:
|
The following table shows:
Table 16. Summary of Import Utility Code Page Semantics (Existing Table)
This table assumes there is no conversion table between a and x. | |||
CODE PAGE ATTRIBUTES OF PC/IXF DATA TYPE | CODE PAGE ATTRIBUTES OF TARGET DATABASE COLUMN | RESULTS OF IMPORT | |
---|---|---|---|
Without FORCEIN | With FORCEIN | ||
SBCS | |||
(0,0) | (0,0) | accept | accept |
(a,0) | (0,0) | accept | accept |
(x,0) | (0,0) | accept | accept |
(x,y) | (0,0) | accept | accept |
(a,y) | (0,0) | accept | accept |
(0,y) | (0,0) | accept | accept |
|
|
|
|
(0,0) | (a,0) | null or reject | accept |
(a,0) | (a,0) | accept | accept |
(x,0) | (a,0) | null or reject | accept |
(x,y) | (a,0) | null or reject | accept |
(a,y) | (a,0) | null or reject | accept |
(0,y) | (a,0) | null or reject | null or reject |
DBCS | |||
(0,0) | (0,0) | accept | accept |
(a,0) | (0,0) | accept | accept |
(x,0) | (0,0) | accept | accept |
(a,b) | (0,0) | accept | accept |
(x,y) | (0,0) | accept | accept |
(a,y) | (0,0) | accept | accept |
(x,b) | (0,0) | accept | accept |
(0,b) | (0,0) | accept | accept |
(0,y) | (0,0) | accept | accept |
|
|
|
|
(0,0) | (a,b) | null or reject | accept |
(a,0) | (a,b) | accept | accept |
(x,0) | (a,b) | null or reject | accept |
(a,b) | (a,b) | accept | accept |
(x,y) | (a,b) | null or reject | accept |
(a,y) | (a,b) | null or reject | accept |
(x,b) | (a,b) | null or reject | accept |
(0,b) | (a,b) | null or reject | null or reject |
(0,y) | (a,b) | null or reject | null or reject |
|
|
|
|
(0,0) | (-,b) | null or reject | accept |
(a,0) | (-,b) | null or reject | null or reject |
(x,0) | (-,b) | null or reject | null or reject |
(a,b) | (-,b) | null or reject | null or reject |
(x,y) | (-,b) | null or reject | null or reject |
(a,y) | (-,b) | null or reject | null or reject |
(x,b) | (-,b) | null or reject | null or reject |
(0,b) | (-,b) | accept | accept |
(0,y) | (-,b) | null or reject | accept |
Notes:
|
The FORCEIN option permits import of certain PC/IXF columns into target database columns of unequal and otherwise incompatible data types. The following data type semantics apply when using the FORCEIN option in either an SBCS or a DBCS environment (except where noted):
PC/IXF columns with data types not defined as valid in PC/IXF Data Types are invalid for import with or without the FORCEIN option.
Table 17 summarizes PC/IXF file import into new or existing database
tables with the FORCEIN option.
Table 17. Summary of PC/IXF File Import with FORCEIN Option
PC/IXF COLUMN DATA TYPE | DATABASE COLUMN DATA TYPE | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NUMERIC | CHARACTER | GRAPH | DATETIME | |||||||||||
SMALL INT | INT | BIGINT | DEC | FLT | (0,0) | (SBCS, 0)e | (SBCS, DBCS)b | b | DATE | TIME | TIME STAMP | |||
Numeric | ||||||||||||||
-SMALLINT | N |
|
|
|
|
|
|
|
|
|
|
| ||
| E | E | E | Ea | E |
|
|
|
|
|
|
| ||
-INTEGER |
| N |
|
|
|
|
|
|
|
|
|
| ||
| Ea | E | E | Ea | E |
|
|
|
|
|
|
| ||
-BIGINT |
|
| N |
|
|
|
|
|
|
|
|
| ||
| Ea | Ea | E | Ea | E |
|
|
|
|
|
|
| ||
-DECIMAL |
|
|
| N |
|
|
|
|
|
|
|
| ||
| Ea | Ea | Ea | Ea | E |
|
|
|
|
|
|
| ||
-FLOAT |
|
|
|
| N |
|
|
|
|
|
|
| ||
| Ea | Ea | Ea | Ea | E |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
| ||
Character | ||||||||||||||
-(0,0) |
|
|
|
|
| N |
|
|
|
|
|
| ||
|
|
|
|
|
| E | E w/F | E w/F | E w/F | Ec | Ec | Ec | ||
-(SBCS,0) |
|
|
|
|
|
| N | N |
|
|
|
| ||
|
|
|
|
|
| E | E | E |
| Ec | Ec | Ec | ||
-(SBCS, DBCS) |
|
|
|
|
|
| N w/Fd | N |
| Ec | Ec | Ec | ||
|
|
|
|
|
| E | E w/F | E |
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
| ||
Graphic | ||||||||||||||
|
|
|
|
|
| N w/Fd |
|
| N |
|
|
| ||
|
|
|
|
|
| E |
|
| E |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
| ||
Datetime | ||||||||||||||
-DATE |
|
|
|
|
|
|
|
|
| N |
|
| ||
|
|
|
|
|
|
|
|
|
| E |
|
| ||
-TIME |
|
|
|
|
|
|
|
|
|
| N |
| ||
|
|
|
|
|
|
|
|
|
|
| E |
| ||
-TIME STAMP |
|
|
|
|
|
|
|
|
|
|
| N | ||
|
|
|
|
|
|
|
|
|
|
|
| E | ||
a Individual values are rejected if they are out of range for the target numeric data type. b Data type is available only in DBCS environments. c Individual values are rejected if they are not valid date or time values. d Applies only if the source PC/IXF data type is not supported by the target database. e Data type is not available in DBCS environments. |
The following describes differences between Version 1 PC/IXF, used by the database manager, and Version 0 System/370 IXF, used by several host database products: