Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/36031

From BetaArchive Wiki

How to Compile COBOL 3.0 in Microsoft Editor M.EXE/MEP.EXE

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

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

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

Summary: To compile Microsoft COBOL version 3.0 or 3.0a programs from inside the Microsoft Editor (M.EXE or MEP.EXE), the following environment variables must be set in MS-DOS (for example, in your AUTOEXEC.BAT file): SET INIT=Directory that contains TOOLS.INI SET TEMP=Directory that you want to contain your temporary files SET PATH=Directories that contain M.EXE or MEP.EXE, COBOL, or PCOBOL In the TOOLS.INI file, add the following lines under the [M] or [MEP] tags: extmake:cbl COBOL %|F; <<– For DOS support extmake:cbl PCOBOL %|F; <<– For OS\2 support Note: Compiler errors (if any) are not flagged and returned to the editor using the above EXTMAKE function.

More Information: To capture errors so that the errors can be displayed, the following EXTMAKE and macro need to be added to your TOOLS.INI file: extmake:cbl COBOL %|F,,list.err; mycompile:= meta window arg compile meta down up up up up up up arg window window arg “list.err” setfile mycompile:Ctrl+g Note: The above statement “mycompile:= meta … setfile” MUST be placed on one single line. Also, cbl must be in lowercase letters as shown. After reinitializing the editor by exiting the current session or pressing SHIFT+F8, the macro can be started with CTRL+G. The following related information concerning the Microsoft Editor is taken from the README.DOC file of the Microsoft Macro Assembler version 5.1:

Using Text Switches

The text switches extmake and readonly each take a special kind of syntax that allows you to specify drive, filename, basename, or file extension. The syntax consists of the characters %|<letters>F where <letters> consists of any of the following: “p” for path, “d” for drive, “f” for file base name, or “e” for file extension For example, if you are editing the file c:.c, and you make the switch assignment extmake:c cl /Fod:%|pfF %|dfeF each time you give the command <Arg><Compile>, the editor performs the following system-level command: cl /Fod:c:sample.c The expression “%s” is equivalent to “%|feF” except that the former works only once, whereas the latter can appear any number of times in the extmake switch assignment. The expression “%|F” is equivalent to “%|dpfeF”.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.