Microsoft KB Archive/69126

OS/2 API Problem in COBOL 4.00 with Expanded Memory Managers

PSS ID Number: Q69126 Article last modified on 04-25-1991

4.00 | 4.00 MS-DOS | OS/2

Summary: COBOL.EXE and other executables shipped with Microsoft COBOL version 4.00 are bound executables to be run in protected mode and real mode under MS OS/2, as well as under MS-DOS. There is a problem with how the bound program detects whether it is operating in virtual 8086 mode or protected mode. The following error message will incorrectly occur if you run COBOL.EXE, ANIMATE.EXE, ADISCF.EXE, KEYBCF.EXE, or SCREENS.EXE when Microsoft Windows or certain other extended memory managers are running in DOS: The Application Program Interface (API) entered will work only in Microsoft Operating System/2 mode To work around the problem, you can run the executables without any extended memory managers present or with the Microsoft Windows session ended. Also, patch files to correct this problem are available in the application note “EMM Patch Files for OS/2 API Problem” (BC0383), which can be obtained from Microsoft Product Support Services. You can request a copy of this application note on 5.25-inch or 3.5-inch disks.

More Information: Below is a copy of the text portion of this application note:

OS/2 API Problem in COBOL version 4.00 Running with Expanded Memory Managers ========================================== The patch files on the enclosed disk provide support for the Lotus/Intel/Microsoft (LIM) 4.0 expanded memory specification (EMS). If you are having a problem with the COBOL compiler and EMS drivers, you will receive the following error message: The Application Program Interface (API) entered will work only in Microsoft Operating System/2 mode. The enclosed patch files are unbound executables. These files are much smaller in size than the files you are to replace. Characteristics such as compilation speed or object module size will not be affected by this size difference. To learn more about bound and unbound executables, see pages 5-16 through 5-17 of the “Microsoft COBOL 4.0: Operating Guide.” For a discussion on the creation of bound executables using the BIND utility, see pages 65-66 of “Advanced OS/2 Programming” by Ray Duncan (Microsoft Press, 1989). The enclosed disk contains the following files (note the new compilation date of 11/16/90): COBOL.EXE ANIMATE.EXE ADISCF.EXE KEYBCF.EXE SCREENS.EXE To properly install the replacement files, use the DOS Copy command to copy the replacement files over the files of the same name that currently reside in your COBOL directory (for example, if your COBOL directory is C:, place the enclosed disk in drive A, and at the DOS prompt, type “copy a:*.* c:” (without the quotation marks) and press the ENTER key). Note: Prior to installation, please make a backup copy of the enclosed disk. If you must reinstall Microsoft COBOL version 4.00 on your system in the future, it will be necessary to recopy the patch files as well. Note for users dual-booting their PCs with both OS/2 and MS-DOS: Both the bound and unbound versions of these programs may need to reside on your hard disk. If you intend to perform functions included as part of the Microsoft COBOL Professional Development System (PDS) under both OS/2 and MS-DOS, please contact Microsoft Product Support Services for assistance.

Copyright Microsoft Corporation 1991.