Microsoft KB Archive/66592

How to Set COBOL 4.0 Build Options in PWB.EXE 1.1

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

4.00 | 4.00 MS-DOS | OS/2

Summary: When using the Programmer’s WorkBench (PWB) version 1.1 with Microsoft COBOL version 4.0, many options must be explicitly set before PWB.EXE will properly invoke the COBOL 4.0 compiler and LINK version 5.11. Below is a brief chart listing the necessary steps that should be taken to properly set up PWB to compile and link COBOL source code. Each step is detailed in the information in following the chart: Under Options menu | |—–Build Options | | | |—-Set Main Language (COBOL) | | | |—-Set Initial Build Options (.EXE type) | | | |—-Save Current Build Options (if needed) | | | |—-Debugsetting | |—–COBOL Compiler Options | | | |—-Set command-line switches (as needed) | | | |—-Set Debug/Release options | | |—–LINK/NMAKE/CodeView/Browse Options

More Information: Upon invoking PWB.EXE by typing PWB at the DOS command line, the editor screen will appear. The options will be set through the use of the drop-down menus located at the top of the screen. If a single file is to be compiled and linked, it can be loaded into the editor by selecting the File menu and choosing Open. The editor will then focus all operations on that single file. If a project will contain more than one source file, a “makefile” must be created so that the NMAKE.EXE utility can properly update the project files. To load a makefile into PWB.EXE, select the Make menu, and choose Set Program List. If existing makefiles (.MAK) exist, they can be selected or a new one can be created by typing the name of the file with a .MAK extension. PWB.EXE will state that the file does not exist and prompt you for permission to create it. Once the makefile has been created, files can be added/deleted by browsing the available directories. However, the makefile must be saved before it will be recognized by PWB.EXE. Now that you have properly set the environment, you can make option changes that will affect the entire project. Under the Options menu, you must first choose Build Options and then you can change the following project options: Set Main Language – Dictates what language you will be building for. This will determine what compiler and linker is spawned from the environment. Set Initial Build Options – Permits you to quickly select what type of executable (.EXE) file will be produced. Save Current Build Options – After ALL of the options have been set, saving the current build options will append the proper switches to the TOOLS.INI file under a separate tag. The next time Build Options is selected, choosing the project name from the bottom of the list will restore all of the saved options. Debug/Release setting – Toggles debug information on and off. The compiler options can also be explicitly set by choosing COBOL Compiler Options under the Options menu: Dialect – activates directives such as MF(4), MS(2), and ANS85. Debug Information – Selects either CodeView or Animator debug information. Miscellaneous Switches – Allow you to select object CPU, listing options, and run-time type.

Additional reference words: 4.00 Copyright Microsoft Corporation 1993.