Configuring the Micro Focus COBOL compiler on Windows
When
you develop an embedded SQL application with the Micro Focus COBOL
compiler on Windows operating
system, following db2 prep
option and environment
settings must be set.
Procedure
What to do next
You must make calls to all Db2 application programming interfaces using calling convention 74. The Db2 COBOL precompiler automatically inserts a CALL-CONVENTION clause in a SPECIAL-NAMES paragraph. If the SPECIAL-NAMES paragraph does not exist, the Db2 COBOL precompiler creates it, as follows:
Identification Division
Program-ID. "static".
special-names.
call-convention 74 is DB2API.
Also, the precompiler automatically places the symbol DB2API, which is used to identify the calling convention, after the "call" keyword whenever a Db2 API is called. This occurs, for example, whenever the precompiler generates a Db2 API runtime call from an embedded SQL statement.
If calls to Db2 APIs are made in an application which is not precompiled, you should manually create a SPECIAL-NAMES paragraph in the application, similar to that given previously. If you are calling a Db2 API directly, then you will need to manually add the DB2API symbol after the "call" keyword.