Compilation
For CGI applications, you need no particular options to compile a program except for the "MAIN" compile option that you must specify for a main program. However, do not specify the "MAIN" compile option for an ISAPI application because it must be created as a DLL. Additionally, you need the following compile options for an ISAPI application. For details about compile options, see the "NetCOBOL User's Guide."
ALPHAL(WORD) or NOALPHAL
THREAD(MULTI)
Be sure to specify the compile option ALPHAL(WORD) or NOALPHAL for a program with three entry-names as described in "Module Configuration". These options are used to identify the case-sensitivity of an entry-name. On the other hand, specify the THREAD(MULTI) compile option for any source program because ISAPI applications run in multiple threads.
Linkage
For CGI applications, link object files to create an EXE file. The following shows an example.
LINK business-program.obj F3BICIMP.lib MSVCRT.lib F3BICWSR.lib /OUT:run-format-name.exe
An ISAPI application must be created as a DLL. It uses different import libraries than a CGI application. The following shows an example.
LINK /DLL initial-program.obj business-program.obj terminate- program.obj F3BICBDM.obj F3BISAPI.lib F3BICIMP.lib KERNEL32.lib MSVCRT.LIB /OUT: run-format-name.dll /DEF: module-definition.def /ENTRY:COBDMAIN
Describe the three export functions described in "Module Configuration" in the module definition file (module-definition.def). Specifically, describe as follows:
LIBRARY run-format-name EXPORTS GetExtensionVersion HttpExtensionProc TerminateExtension