Nonstop Database, HiRDB Version 9 UAP Development Guide
This section describes how to create at a HiRDB client a UAP that supports 64-bit mode.
You can use C language, C++ language, and COBOL (COBOL2002) to create UAPs. OOCOBOL is not supported.
The XA interfaces are not supported. Other functions are fully supported.
The multi-connection facility provides real threads, not pseudo-threads.
The structure of the SQL Communications Area changes when you set your HiRDB in 64-bit mode. The lengths of the communications area names also change, as shown in the table below. For details about the SQL Communications Area, see Appendix A. SQL Communications Area.
Table 7-4 Communications area names that change in 64-bit mode
Communications area name | Length (bytes) | |
---|---|---|
32-bit mode | 64-bit mode | |
SQLCA | 336 | 368 |
SQLCABC | 4 | 8 |
SQLCODE | 4 | 8 |
SQLERRD | 4 x 6 | 8 x 6 |
The structure of SQL descriptor areas changes when you set your HiRDB in 64-bit mode. The lengths of the descriptor area names also change, as shown in the table below. For details about the SQL descriptor areas, see Appendix B. SQL Descriptor Areas.
Table 7-5 Descriptor area names that change in 64-bit mode
Descriptor area name | 32-bit mode | 64-bit mode | ||
---|---|---|---|---|
Length (bytes) | Data type | Length (bytes) | Data type | |
SQLDA | 16 + 16 x n | -- | 24 + 24 x n | -- |
SQLDABC | 4 | -- | 8 | -- |
SQLVAR | 16 x n | -- | 24 x n | -- |
SQLVAR_LOB | 16 x n | -- | 24 x n | -- |
SQLLOBLEN | -- | long | -- | int |
SQLDATA | 4 | -- | 8 | -- |
SQLIND | 4 | -- | 8 | -- |
SQLLOBIND | 4 | long * | 8 | int * |
In a UAP written in C language when 64-bit mode is supported, the size of the long type is 8 bytes. Therefore, embedded variables that have been using long will use int instead of long. This change affects the data descriptions in C language as shown in the table below. For details about the data descriptions in C language, see Appendix F.1 SQL data types and C data descriptions.
Table 7-6 C data descriptions that change in 64-bit mode
SQL data type | C data description | Item specification | Remarks | |
---|---|---|---|---|
INTEGER | Simple format | int variable-name; | variable | None |
Array format | int variable-name[n]; | array | 1 |
|
Indicator variable for BLOB | int indicator-variable-name; | -- | None | |
SQL statement | struct{ int len; char str[n]; }variable-name; |
structure | None |
When you compile and link a UAP that uses hash functions for table partitioning, the shared libraries to be specified are different. For details about how to create a UAP that uses hash functions for table partitioning, see Appendix H.1 Hash function for table partitioning.
In order to migrate a HiRDB client from 32-bit mode to 64-bit mode, you must upgrade your HiRDB client to 64-bit mode edition (by installing 64-bit mode edition of HiRDB client and then setting up the client environment). For details about client environment setup, see 6. Client Environment Setup.
When you install the 64-bit mode edition of HiRDB client, files for 64-bit mode are created. For details about the files that are created during installation, see 6.4 Organization of directories and files for a HiRDB client.
Once you have set up the client environment, you must make changes to the UAPs so that they will function in 64-bit mode. The procedure is explained below:
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.