Microsoft KB Archive/68053

How LINKing Differs in COBOL 4.0 Versus 3.0/3.0a

PSS ID Number: Q68053 Article last modified on 04-20-1993

4.00 | 4.00 MS-DOS | OS/2

Summary: Compared to COBOL 3.0/3.0a, COBOL 4.0 provides a newer version of LINK.EXE. COBOL 4.0 also groups its run-time modules into new multiple libraries named COBLIB.LIB, COBAPI.LIB, OS2.LIB, and LCOBOL.LIB. COBOL 4.0 ships with LINK.EXE version 5.11; however, COBOL 3.0 and 3.0a ship with LINK.EXE version 5.02.05. To determine what libraries to use when LINKing a COBOL 4.0 program, note which run-time system (RTS) you want to use. Locate the libraries used with COBOL 3.0 and substitute the corresponding COBOL 4.0 libraries. For example, if your COBOL 3.0 LINK line uses LCOBOL, then you should use COBLIB + COBAPI (which use Shared RTS) in COBOL 4.0. The following table compares the LINK libraries used in COBOL 3.0/3.0a with the equivalent libraries needed in COBOL 4.0:

|  COBOL 3.0       |   COBOL 4.0      |   COBOL 4.0     | |   or 3.0a        | with Shared RTS  | with Static RTS | ——-|——————-|——————|—————–| MS-DOS | LCOBOL | COBLIB + COBAPI | LCOBOL + COBAPI | ——-|——————-|——————|—————–| OS/2 | PCOBOL + DOSCALLS | COBLIB + OS2 | LCOBOL + OS2 | ——-|——————-|——————|—————–|

More Information: Setup creates a default LINKLIB in your COBOL.DIR to define the run-time system you select at install time. The Setup default values use the COBLIB sharable run-time module, requiring LINKLIB(COBLIB+COBAPI) under DOS, and LINKLIB(COBLIB+OS2) under OS/2. Note that programs linked with COBLIB cannot call or be called by programs linked with LCOBOL. You cannot mix run-time systems. You can still link with other environments by specifying other relevant libraries on the LINK command line; however, you should use the LINK /NOD option to assure correct results. For more information on the differences between the COBLIB and LCOBOL run-time systems, query on the following words: COBOL and 4.00 and COBLIB and LCOBOL and run-time system

Additional reference words: 4.00 Copyright Microsoft Corporation 1993.