HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide
If abstract data types are passed to an import information editing UOC routine, the input data for constructor functions of the abstract data type is passed as attribute data of the abstract data type.
Because attribute data of the abstract data type contains information that is specific to the abstract data type, an import information editing UOC routine must import it to the constructor functions of the abstract data type as is (update data of the abstract data type cannot be edited or processed before it is imported).
This subsection explains the abstract data type mnemonics and the structure of column data.
Table 8-16 Column data type mnemonics (UCOLUMN_BLK.coltype) and Table 8-17 Data address mnemonics (UCOLUMN_BLK.dataptr) show the abstract data type mnemonics. For details about the non-abstract data type mnemonics, see Table 8-10 Column data type mnemonics and Table 8-11 Data address mnemonics.
Table 8-16 Column data type mnemonics (UCOLUMN_BLK.coltype) (UCOLUMN_BLK.coltype)
| Column data type | Mnemonic | Data code |
|---|---|---|
| ADT (abstract data type) | HDS_T_ADT | (0x83) |
Table 8-17 Data address mnemonics (UCOLUMN_BLK.dataptr)
| Data type | Mnemonic | Address type |
|---|---|---|
| ADT (abstract data type) | HDS_A_ADT | UTYPE_BLK * |
The figure below shows the structure of abstract data-type column data. For details about the structure of non-abstract data-type column data, see Figure 8-4 UDATA_BLK and related structures.
Figure 8-5 Structure of abstract data-type column data
The following table shows the contents of UTYPE_BLK (abstract data type information).
Table 8-18 Contents of UTYPE_BLK (abstract data type information)
| Member name | Length (bytes) | Attribute | Area name | Defined by | Description |
|---|---|---|---|---|---|
| schema_name | 31 | char | Authorization identifier | Caller | Authorization identifier for the abstract data type (including the termination symbol) |
| type_name | 31 | char | Abstract data type name | Caller | Type name of the abstract data type (including the termination symbol) |
| reserve1 | 2 | char | Reserved area 1 | Caller | Reserved |
| def_attrnum | 4 | int | Number of defined attributes | Caller | Number of attributes defined for the abstract data type |
| set_attrnum | 4 | int | Number of attribute data items | Caller | Number of attribute data items stored in the data type |
| data_addr | 4 | UATTR_BLK * | UATTR_BLK * address | Caller | Address of the attribute management table (UATTR_BLK) |
| reserve2 | 8 | char | Reserved area 2 | Caller | Reserved |
The following table shows the contents of UATTR_BLK (attribute data information).
Table 8-19 Contents of UATTR_BLK (attribute data information)
| Member name | Length (bytes) | Attribute | Area name | Defined by | Description |
|---|---|---|---|---|---|
| attr_name | 31 | char | Attribute name | Caller | Attribute name (including the termination symbol) |
| attr_type | 1 | unsignedchar | Data type of the attribute | Caller | Data type of the attribute For details about the data type mnemonics, see Table 8-10 Column data type mnemonics. |
| null_flag | 1 | unsignedchar | NULL flag for the attribute | Caller | NULL flag for the attribute
|
| adtfunc | 1 | unsignedchar | Import method for the abstract data type | Caller | Import method for the abstract data type
|
| reserve1 | 3 | char | Reserved area 1 | Caller | Reserved |
| attr_len | 4 | int | Attribute data length | Caller | Attribute data length The value is 0 in the following cases:
|
| adtelnum | 4 | int | Abstract data type inheritance count | Caller | Number of data types with an inheritance relationship when the data type of the attribute is the abstract data type
|
| data_addr | 4 | UNION * | Attribute data address | Caller | Attribute data address (input data for constructor function of the abstract data type that is entered at the source)
|
| reserve2 | 8 | char | Reserved area 2 | Caller | Reserved |
Table 8-20 Settings for UTYPE_BLK for each abstract data type shows the settings for UTYPE_BLK for each abstract data type, and Table 8-21 Settings for UATTR_BLK for each abstract data type shows the settings for UATTR_BLK for each abstract data type.
Table 8-20 Settings for UTYPE_BLK for each abstract data type
| Member name | Abstract data type | ||
|---|---|---|---|
| SGMLTEXT | FREEWORD | XML | |
| schema_name | MASTER | MASTER | MASTER |
| type_name | SGMLTEXT | FREEWORD | XML |
| reserve1 | Reserved | Reserved | Reserved |
| def_attrnum | 0 | 0 | 0 |
| set_attrnum | 1 | 1 | 1 |
| data_addr | UATTR_BLK address | UATTR_BLK address | UATTR_BLK address |
| reserve2 | Reserved | Reserved | Reserved |
Table 8-21 Settings for UATTR_BLK for each abstract data type
| Member name | Abstract data type | ||
|---|---|---|---|
| SGMLTEXT | FREEWORD | XML | |
| attr_name | Not specified. | Not specified. | Not specified. |
| attr_type | HDS_T_BLOB(0x93)# | HDS_T_VCHAR(0xC1)# | HDS_T_BINARY(0x91)# |
| null_flag | 0x00 | 0x00 | 0x00 |
| adtfunc | 0x00 | 0x00 | 0x00 |
| reserve1 | Reserved | Reserved | Reserved |
| attr_len | Actual attribute data length (maximum 2,147,483,647) |
Actual attribute data length (maximum 32,000) |
Actual attribute data length (maximum 2,147,483,647) |
| adtelnum | 0 | 0 | 0 |
| data_addr | Attribute data address | Attribute data address | Attribute data address |
| reserve2 | Reserved | Reserved | Reserved |
For abstract data types, no value is set in the collen member (column data length) of UCOLUMN_BLK that is passed to an import information editing UOC routine. For this reason, when abstract data types are handled, you must not reference the collen member of UCOLUMN_BLK.
Figure 8-6 Example of coding that executes INSERT on the table that contains columns of the abstract data types.
All rights reserved. Copyright (C) 2007, 2013, Hitachi, Ltd.