(1) Downloaded for the TinyCobol package found here.
(2) Run the installer into the default install folder: C:\MinGW
(3) Create the following Test.cob COBOL file:
(4) I use the Options, Document Types menu to edited the Zeus COBOL document type and defined the compiler command line as follows:
Code: Select all
* Hello World Program IDENTIFICATION DIVISION. PROGRAM-ID. "cobmain". DATA DIVISION. WORKING-STORAGE SECTION. 01 MYVAR PIC X(20). PROCEDURE DIVISION. DisplayPrompt. MOVE "HELLO" to MYVAR DISPLAY "Hello, world.". STOP RUN.
and added the C:\MinGW\bin\ to the computers PATH environment variable.
Code: Select all
htcobol.exe -M "$fn"
(5) When I ran the Zeus compile on the Test.cob COBOL file I got the following error:
It turns out as the name suggest the COBOL compiler needs the MinGW GCC back end compiler.'as.exe' is not recognized as an internal or external command,
operable program or batch file.
(6) So I got the MinGW-5.1.4.exe package found here: http://sourceforge.net/project/showfile ... up_id=2435
This is an small installer program. When you run it, it does a remote install of the MinGW in the same folder as TinyCobol.
After running the above installer the missing as.exe file was now in the installation folder.
Edit: This link provides some alternate instructions on how to download and install the MinGW compiler backend:
(7) TinyCobol also needs the Berkeley's DB library which I found here:
I extracted the library and header files contained in the zip file into the library and header folders of the C:\MinGW\ folder.
To get things to work I also had to copy the libdb.a to libdb1.a
(8) TinyCobol also needs the New Curses Library.
I found the pdcurses-2.6.0-2003.07.21-1.exe installer here:
http://sourceforge.net/project/showfile ... e_id=24937
I ran the installer into the C:\MinGW\
Now when I repeated step 4 I found that a Test.exe file was in fact produced
But unfortunately when I ran the Test.exe it ran without error but it did not print the expected Hello world output
My conclusion is the TinyCobol will probably work but it does require a fair bit of tweaking. I not really sure why the resulting executable did not produce the output expected
Edit: I suspect the reason the Test.exe did not print the expected Hello world output was because of a DLL mixup on my system. A similar problem was noticed when setting Zeus up to run the GNU C++ compiler.
More details on the problem and the fix can be found here: http://www.zeusedit.com/zforum/viewtopic.php?t=6959