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

ID: Q73005


The information in this article applies to:
  • Microsoft Embedded SQL for COBOL, version 4.2


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 "stop run" statements to "exit program" 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 "SET COBPOOL=10" at the MS-DOS prompt.

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


   CALL "SQLINTF.EXE" 

to read as follows:

   CALL "SQLINTF.DLL" 

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 : kbprg SSrvCobol SSrvProg
Version : 4.2 | 4.2
Platform : MS-DOS OS/2
Issue type :


Last Reviewed: March 11, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.