This section outlines the steps for writing and running a C language program that uses the Information Catalog Manager API calls. Most of this information is standard for any C language program you write.
To build an Information Catalog Manager application using C language:
The Information Catalog Manager library is DGWAPI.LIB.
Use the following steps to set up your environment to compile and run the Information Catalog Manager programs written in the C language:
The LIBPATH= environment variable must include the x:\SQLLIB directory, where x is the drive where you installed DB2 UDB.
The SET INCLUDE= statement must include the x:\SQLLIB\LIB directory. The directory containing the WINDOWS.H should also be specified on SET INCLUDE=.
SET LIB= must include the x:\SQLLIB\LIB directory.
To compile your application using Microsoft Visual C++ Compiler you need to issue a command
such as:
cl /c filename.c
You might need or want to add other options, depending on the compiler you use and the way you write your program.
To link your program, issue a command such as:
link /dll dgwapi.lib filename.obj