Microsoft KB Archive/66456

COBLIB Versus LCOBOL Run-Time System in COBOL 4.00

PSS ID Number: Q66456 Article last modified on 04-24-1991

4.00 | 4.00 MS-DOS | OS/2

Summary: This article discusses the differences between the two run-time systems, LCOBOL and COBLIB, which come with Microsoft COBOL Professional Development System (PDS) version 4.00 for MS-DOS and MS OS/2.

More Information: The default run-time system is COBLIB, the dynamic run-time system. COBLIB is particularly recommended for use with MS OS/2, where a single copy of COBLIB.DLL can be shared by any COBOL application built to use COBLIB running in any OS/2 session. To use the COBLIB run-time system, the application is linked using the libraries COBLIB.LIB and COBAPI.LIB (DOS) or OS2.LIB (OS/2). The executable files produced will be much smaller because little run-time code is directly included. System programs, such as EXTFH and ADIS, can be linked in with the application, or linked as stand-alone subprograms (ADIS.DLL and ADIS.EXE, for example). For more information on creating these stand-alone subprograms, query on the following words: COBOL and 4.00 and ADIS and create Note that modules linked with COBLIB cannot be mixed with modules linked with LCOBOL. However, COBLIB applications and LCOBOL applications can run in the same environment, as long as they do not make CALLs to each other. Although COBLIB is the default environment, some programmers may notice that their applications run more slowly in this environment as opposed to the LCOBOL environment. It is possible, depending on what the program does, for the application to access the disk more often and consequently run more slowly. This would probably be more noticeable on larger programs. There is no strict rule on when to use which run-time system. In general, with more than six modules, you should use COBLIB. However, the application may run more slowly. With only a few modules, LCOBOL may be advantageous because the programs will load faster and may run faster. It is up to the individual programmer to decide which run-time system will best suit his or her needs.

Copyright Microsoft Corporation 1991.