The following articles mainly describe how to set up the DB2 V7 storage process building environment, as well as the specific descriptions of Related Matters worth attention in actual operations, the following is a detailed analysis of the main content of the article. I hope you will have a better understanding of it after browsing.
1. V7 SQL Stored procedures are built using the built-in DB2 SPB development tool (Stored Procedure Builder), provided that it supports third-party C compilers. Such as VC5/VC6 or C compiler released by IBM.
2. The following describes how to use VC6. The directory location must be modified based on the Installation conditions.
A. Run DB2 SPB, create A project, select the target database, and enter the logon ID and password;
B. "selected" menu, SQL SP build option,
Compiler environment:
- c:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat
Compiler Options:
- cl -Ox -W2 /TC -D_X86_=1 -IC:\Progra~1\SQLLIB\include SQLROUTINE_FILENAME.
- c /link -dll -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll C:\Progra~1\SQLLIB\lib\db2api.lib
The compiler environment is actually a batch processing of some environment variable settings. The option is actually to compile the command line. Note that the path in the command does not support long file names, and the DOS file name format of 8.3 must be used.
The above content is an introduction to the Environment setting for building the DB2 V7 stored procedure. I hope you will get some benefits.