Microsoft KB Archive/73005

= INF: COBLIB: .EXE Calling .GNT Files with ESQL for COBOL =

PSS ID Number: 73005

Article Last Modified on 10/3/2003

-

The information in this article applies to:


 * Microsoft Embedded SQL for COBOL 4.2

-



This article was previously published under Q73005



SUMMARY
There is a sample application named COBLIB in the Software/Data Library that shows how to create an Embedded SQL for COBOL MS-DOS application consisting of an .EXE file linked with COBLIB that calls a .GNT file. This method is very useful for large MS-DOS applications because it lessens the memory required to load and execute the application.



MORE INFORMATION
The COBLIB sample file consists of source code for DRIVER.CBL and SQLDOS.CBL. It also includes COMPILE.CMD, which can be used to create the application. SQLDOS.CBL is the same program that is included in the Embedded SQL for COBOL Developer's Kit, except that it was modified to change all &quot;stop run&quot; statements to &quot;exit program&quot; statements. This allows control to return to DRIVER.EXE.

The basic idea is that DRIVER.EXE makes a call to SQLINTF.EXE to load the Embedded SQL for COBOL support and then calls SQLDOS.GNT to actually perform all the Embedded SQL for COBOL statements.

Please note that this requires that the COBPOOL environment variable be set. Do this by typing &quot;SET COBPOOL=10&quot; at the MS-DOS prompt.

To create a similar OS/2 application, modify the following line in DRIVER.CBL

CALL &quot;SQLINTF.EXE&quot;

to read as follows:

CALL &quot;SQLINTF.DLL&quot;

Then, modify the link line in COMPILE.CMD from the following

link driver.obj,,,coblib+cobapi;

to the following:

link driver.obj,,,coblib+os2;

COBLIB can be found in the Software/Data Library by searching on the word COBLIB, the Q number of this article, or S13133. COBLIB was archived using the PKware file-compression utility.

Keywords: kbprogramming KB73005

Technology: kbAudDeveloper kbSQLEmCOBOL kbSQLServSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.