Scalable Database Server, HiRDB Version 8 UAP Development Guide
You must use a compiler that conforms to the language used for the UAP in which the SQL statements are embedded to compile and link edit a post-source program created by the preprocessor.
For the compilation and linkage methods in the Windows environment, see the manuals for the compilers applicable to the particular languages. This section explains the compilation and linkage options for each language. The section also contains instructions for Windows (x64).
To compile post-source programs written in C, use Microsoft Visual C++.
To set options for compilation and linkage using Microsoft Visual C++, from the Project menu, choose Setup. (The setup method differs depending on the Microsoft Visual C++ version.)
Table 8-17 shows the items to be set in Setup.
Table 8-17 Items set with Setup
Item | Category | Category setting | Setting value |
---|---|---|---|
Compiler | Code generation | Alignment of structure members | 8 bytes |
Runtime library to be used | Multi-thread* | ||
Preprocessor | Include file path | \HiRDB\include | |
Linker | Input | Library | \HiRDB\lib\cltdll |
* All libraries except CLTDLL are created with multiple threads.
For Windows Server 2003 (IPF), only the 64-bit mode client library can be used. When creating a UAP in 64-bit mode, adhere to the following conditions:
To compile post-source programs in COBOL, use a compiler that conforms to the COBOL85 or COBOL2002 standards. To compile a post-source program in OOCOBOL, use a compiler that conforms to the OOCOBOL standard.
To set options for compilation and linkage using COBOL85 (version 1.0 or subsequent versions), choose Edit, then Edit Project.
For Windows, choose Option, then Compile and Linker.
For COBOL2002, from the Project Setup menu, choose the Linker tab.
Table 8-18 shows the item to be set with Edit Project in COBOL85. Do not specify the -Kl, -Xb, -Bb, or -Fb option. Also do not specify the -Xc option together with -Hf, -Hv, or -V3. Table 8-19 shows the item to be set with Project Setup in COBOL2002.
Table 8-18 Item to be set with Edit Project in COBOL85
Item | Setting item | Setting value |
---|---|---|
Linkage option setting | Import library | \HiRDB\lib\cltdll.lib |
Compilation option | /NOI (Upper-case and lower-case characters are discriminated in the file identifier.) |
Table 8-19 Item to be set with Project Setup in COBOL2002
Item | Setting item | Setting value |
---|---|---|
Link | Library specification | \HIRDB\lib\cltdll.lib |
COBOL85 has an option to be set for Compilation Environment. Table 8-20 shows the item to be set for Compilation Environment in COBOL85. In COBOL2002, this item is set to an environment variable.
Table 8-20 Item to be set for Compilation Environment in COBOL85
Item | Setting item | Setting value |
---|---|---|
Environment variable setting* | CBLLIB variable | \HiRDB\include |
* For COBOL2002, the item is set for Environment Variable.
Windows (x64) provides both 32-bit mode and 64-bit mode client libraries. To create a UAP in 32-bit mode, specify the compilation options and library for 32-bit mode. To create a UAP in 64-bit mode, specify the compilation options and library for 64-bit mode.
The following table lists the UAP creation conditions:
Platform | 32-bit mode (Win32) |
64-bit mode (x64) |
---|---|---|
Alignment of structure members | Default (8 bytes) | Default (8 bytes) |
Runtime library to be used | Multi-thread DLL | Multi-thread DLL |
Include file directory | \HiRDB\INCLUDE | \HiRDB\INCLUDE |
Linkage library* | \HiRDB\LIB\PDCLTM32.LIB | \HiRDB\LIB\PDCLTM64.LIB |
Note that the following UAPs cannot be created for the 64-bit mode:
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.