Nonstop Database, HiRDB Version 9 Command Reference
An interface area is used to exchange information between pdrorg and a UOC. It is called a UOC interface area.
pdrorg always allocates this area except for the update buffer. The UOC receives the address of this area in the first argument of a call function to reference and update information.
Figure 8-28 Structure of the UOC interface area (1/2) and Figure 8-29 Structure of the UOC interface area (2/2) show the structure of the UOC interface area.
Figure 8-28 Structure of the UOC interface area (1/2)
Figure 8-29 Structure of the UOC interface area (2/2)
Table 8-32 Contents of the UOC interface area
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Eye-catcher | 8 | 8 | char | pdrorg | Interface area ('*UOCINF*') |
8 | 8 | Running program | 4 | 4 | int | pdrorg | Program that has control: 0: pdrorg 1: UOC |
12 | 12 | Call type | 4 | 4 | int | pdrorg | Type of processing request to the UOC: o: Start request e: Data update request c: Termination request t: Stop request |
16 | 16 | Length of authorization identifier | 2 | 2 | short | pdrorg | Length of the target table's owner name |
18 | 18 | Authorization identifier | 30 | 30 | char | pdrorg | Target table's owner name |
48 | 48 | Length of table identifier | 2 | 2 | short | pdrorg | Length of the target table name |
50 | 50 | Table identifier | 30 | 30 | char | pdrorg | Name of the target table |
80 | 80 | Row length | 4 | 8 | long | pdrorg | If the data storage method is Y, this field sets the row length. |
84 | 88 | Address of the data address list | 4 | 8 | void* | pdrorg | Start address of the data address list that contains the address of the data retrieved by pdrorg |
88 | 96 | Information used by the system | 4 | 8 | long | pdrorg | Information used by the system (UOC may not use this information) |
92 | 104 | Address of the post-update data address list | 4 | 8 | void* | UOC | If the data updated by the UOC is to be returned to pdrorg, this field sets the start address of the post-update data address list that contains the address of the data created within the UOC. If the data is not to be updated, this field sets 0. |
96 | 112 | Address of user parameter | 4 | 8 | void* | pdrorg | Address of the character string that was specified in the param operand of the unlduoc statement (the character string ends with /0). If the param operand was omitted, the null value is set. |
100 | 120 | Address of the column definition information address list | 4 | 8 | void* | pdrorg | Start address of the column definition information address list for the target table |
104 | 128 | Reserved | 1 | 1 | char | pdrorg | Reserved area (UOC may not use this information) |
105 | 129 | Table attribute | 1 | 1 | char | pdrorg | Attribute of the target table: F: FIX table blank: Non-FIX table |
106 | 130 | Number of columns | 2 | 2 | short | pdrorg | Number of columns in the target table |
108 | 132 | Storage flag | 1 | 1 | char | UOC | Storage flag: Y: Stores data in unload data file. N: Does not store data in unload data file. If pdrorg is used to create an unload data file, make sure that this flag is set (if the UOC is used to create a UOC data file, there is no need to set this flag). |
109 | 133 | Data storage method | 1 | 1 | char | pdrorg | For a FIX table, this field sets the value of the fixrow operand specified in the unlduoc statement (when fixrow is omitted, the field sets N). Y: Passes data in the order the columns were defined (consecutively). N: Passes the start address of the data that has been corrected according to the boundary of data type. |
110 | 134 | Reserved | 10 | 10 | char | pdrorg | Reserved area (UOC may not use this information) |
120 | 144 | Return code | 4 | 4 | int | UOC | Return code. The UOC that has received control from pdrorg must set a return code for each call according to the following guidelines:
|
124 | 148 | Message-embedded area | 132 | 132 | char | pdrorg UOC |
Storage area for the message that is output to the standard output and message log (pdrorg places \0 at the beginning of the message before passing it). |
Field name | Call type | |||
---|---|---|---|---|
Start request | Data update request | Termination request | Stop request | |
Eye-catcher | R | R | R | R |
Running program | R | R | R | R |
Call type | R | R | R | R |
Length of authorization identifier | R | R | R | R |
Authorization identifier | R | R | R | R |
Length of table identifier | R | R | R | R |
Table identifier | R | R | R | R |
Row length | N | R | N | N |
Address of the data address list | N | R | N | N |
Address of the post-update data address list | N | Y | N | N |
Address of user parameter | R | R | R | R |
Address of the column definition information address list | R | R | R | R |
Table attribute | R | R | R | R |
Number of columns | R | R | R | R |
Data storage method | N | Y | N | N |
Message-embedded area | Y | Y | Y | Y |
Return code | Y | Y | Y | Y |
Storage flag | N | Y | N | N |
Table 8-33 Contents of column definition information address list
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Definition information address for column ID1 | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column ID1. |
4 | 8 | Definition information address for column ID2 | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column ID2. |
(n - 1) 4 | (n - 1) 8 | Definition information address for column IDn | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column IDn. |
Table 8-34 Contents of column definition information area
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Length of column name | 2 | 2 | short | pdrorg | Sets the length of the column name. |
2 | 2 | Column name | 30 | 30 | char | pdrorg | Sets the column name. |
32 | 32 | Column ID | 2 | 2 | short | pdrorg | Sets the column ID. |
34 | 34 | Reserved 1 | 1 | 1 | -- | -- | -- |
35 | 35 | Data type | 1 | 1 | unsigned char | pdrorg | Sets the data type of the column. For details about the data code and data value boundary for each data type, see Table 8-37 Data code and data value boundary for each data type. |
36 | 36 | Defined length | 2 | 2 | short | pdrorg | Sets the defined length of the column. For details about the length and contents of the definition length area for columns, see Table 8-37 Data code and data value boundary for each data type. |
38 | 38 | Repetition count | 2 | 2 | short | pdrorg | Sets the repetition count for the column. |
40 | 40 | BLOB or BINARY length | 8 | 8 | int[2] | pdrorg | This field is set if the column's data type is large object data or BINARY. The first 4 bytes are set to 0 and the remaining 4 bytes contain the defined length of large object data type in bytes. |
48 | 48 | Number of parameter | 2 | 2 | short | pdrorg | For an abstract data type, this field sets the number of functions in the corresponding unld_func statements (number of parameters). A value of 0 is set in the following cases:
|
50 | 50 | Reserved 2 | 6 | 6 | char | pdrorg | Reserved area |
56 | 56 | Extended address | 4 | 8 | void* | pdrorg | Sets the start address of the abstract data type reverse-creation parameter information. A value of 0 is set if the number of parameters is 0. |
60 | 64 | Reserved 3 | 64 | 64 | char | pdrorg | Reserved area |
Table 8-35 Contents of the abstract data type reverse-creation parameter information area
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description |
---|---|---|---|---|---|
0 | Parameter number | 2 | short | pdrorg | Parameter number (beginning with 1) |
2 | Data type | 1 | unsigned char | pdrorg | Sets the data type of the parameter. For details about the data code and data value boundary for each data type, see Table 8-37 Data code and data value boundary for each data type. |
3 | Reserved 1 | 3 | char | pdrorg | Reserved area |
6 | Defined length | 2 | short | pdrorg | Sets the defined length of the parameter. For details about the length and contents of the definition length area for columns, see Table 8-36 Length and contents of the definition length area for columns. |
8 | BLOB or BINARY length | 8 | int[2] | pdrorg | If the parameter's data type is large object data or BINARY, this field sets the BLOB length. The first 4 bytes are set to 0 and the remaining 4 bytes contain the defined length of large object data type in bytes. |
16 | Reserved 2 | 112 | char | pdrorg | Reserved area |
Table 8-36 Length and contents of the definition length area for columns
Data type | Area size | Description |
---|---|---|
DECIMAL, LARGE DECIMAL, INTERVAL YEAR TO DAY, and INTERVAL HOUR TO SECOND |
Leading 1 byte | Precision specified in the definition |
Trailing 1 byte | Unit specified in the definition | |
TIMESTAMP(p) | 2 bytes | 7 + p/2 |
BLOB, abstract data type, and BINARY | 2 bytes | Value is not guaranteed |
Other | 2 bytes | Defined length |
Table 8-37 Data code and data value boundary for each data type
Data type | Data code (hexadecimal) | Boundary (in bytes) | ||
---|---|---|---|---|
NOT NULL constraint omitted | NOT NULL constraint specified | |||
MVARCHAR | A1 | A0 | 2 | |
MCHAR | A5 | A4 | -- | |
NVARCHAR | B1 | B0 | 2 | |
NCHAR | B5 | B4 | -- | |
VARCHAR | C1 | C0 | 2 | |
CHAR | C5 | C4 | -- | |
FLOAT | E1 | E0 | 8 | |
SMALLFLT | E3 | E2 | 4 | |
DECIMAL | E5 | E4 | -- | |
INTEGER | F1 | F0 | 4 | |
SMALLINT | F5 | F4 | 2 | |
INTERVAL YEAR TO DAY | 65 | 64 | -- | |
DATE | 71 | 70 | -- | |
TIME | 79 | 78 | -- | |
INTERVAL HOUR TO SECOND | 6F | 6E | -- | |
TIMESTAMP | 7D | 7C | -- | |
BINARY | 91 | 90 | 4 | |
BLOB | 93 | 92 | 4 | |
Abstract data type | Address list of abstract data type parameter | 83 | 82 | 4 for a HiRDB in the 32-bit mode and 8 for a HiRDB in the 64-bit mode |
Data for parameter | Depends on the data type of the parameter |
Table 8-38 Contents of data address list
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Data storage address for column ID1 | 4 | 8 | void* | pdrorg | Sets the address of the data for column ID1. |
4 | 8 | Data storage address for column ID2 | 4 | 8 | void* | pdrorg | Sets the address of the data for column ID2. |
(n - 1) 4 | (n - 1) 8 | Data storage address for column IDn | 4 | 8 | void* | pdrorg | Sets the address of the data for column IDn. |
Table 8-39 Contents of post-update data address list
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Data storage address for column ID1 | 4 | 8 | void* | UOC | Sets the address of the data for column ID1. |
4 | 8 | Data storage address for column ID2 | 4 | 8 | void* | UOC | Sets the address of the data for column ID2. |
(n - 1) 4 | (n - 1) 8 | Data storage address for column IDn | 4 | 8 | void* | UOC | Sets the address of the data for column IDn. |
Column attribute | Data before updating | Data after updating | |
---|---|---|---|
Non-null value | Null value | ||
NOT NULL constraint omitted | Null value | Y | Y |
Non-null value | Y | Y | |
NOT NULL constraint specified | Non-null value | Y | N |
This section explains the data values of each data type.
The following figure shows the format when character code conversion is not performed or when character code conversion that does not affect the data lengths is performed.
The following figure shows the format when data lengths are changed by character code conversion.
For an abstract data type, the address list of an abstract data-type parameter is stored. Figure 8-30 Structure of the address list for an abstract data-type parameter shows the structure of the address list for an abstract data-type parameter, and Table 8-40 Contents of the address list for an abstract data-type parameter describes the contents of the address list for an abstract data-type parameter.
Figure 8-30 Structure of the address list for an abstract data-type parameter
Table 8-40 Contents of the address list for an abstract data-type parameter
Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description | ||
---|---|---|---|---|---|---|---|
32 | 64 | 32 | 64 | ||||
0 | 0 | Data address for parameter 1 | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter 1. |
4 | 8 | Data address for parameter 2 | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter 2. |
(n - 1) 4 | (n - 1) 8 | Data address for parameter n | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter n. |
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.