Microsoft KB Archive/36077

From BetaArchive Wiki

How to Make Bound COBOL 3.0 Programs for MS-DOS and MS OS/2

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

3.00 | 3.00 MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, version 3.0

Summary: Bound COBOL Version 3.0 programs can be made by using the BIND utility. Note that a “bound” program is one that can run under MS-DOS (or MS OS/2 real mode) as well as MS OS/2 protected mode. However, not all COBOL programs can be bound. Some restrictions are as follows: 1. The program must be compiled and linked in protected mode. 2. Any subprograms used by the program (i.e., ADIS, IXSIO support routines, user subprograms) must be statically-linked or soft-linked to the program. Please refer to the “Microsoft COBOL Version 3.0: Operating Guide,” pages 4-4 to 4-5 for more information on the various linking methods. 3. The program must not open more than 15 files at any one time. Note that ISAM files are composed of two files, a data file and an index file, so the limit for a program that opens only ISAM files is 7. 4. The program must be succesfully bound by the BIND utility. Before invoking the BIND utility, make sure that DOSCALLS.LIB, API.LIB, CBLBIND.LIB, CBLBIND.NOT, ADIS.OBJ, ADISINIT.OBJ, ADISKEY.OBJ, and IXSIO.OBJ for indexed files are in the same directory as the target program. The following example demonstrates how to BIND a program named TEST: Step 1: PCOBOL TEST; Step 2: LINK /NOD /NOP TEST+ADIS+ADISINIT+ADISKEY,,,PCOBOL.LIB+DOSCALLS.LIB; Step 3: BIND TEST CBLBIND.LIB DOSCALLS.LIB /n @CBLBIND.NOT

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.