February 3rd, 2008
I finally got around to installing a COBOL compiler on my computer here at home. I downloaded OpenCOBOL which built from source with no problems on my Mac. I went ahead and wrote the typical “Hello World” program to test that everything compiled and installed correctly:
1 2 3 4 5 | 000001 IDENTIFICATION DIVISION. 000002 PROGRAM-ID. hello. 000003 PROCEDURE DIVISION. 000004 DISPLAY "Hello World!". 000005 STOP RUN. |
And compiled it:
cobc -x hello.cob
And ran it:
./hello
Hello World!
Brilliant. Now I need to find a good book on the COBOL language so I can get down the syntax. And also find some fairly sizable COBOL code that I can read through to get a sense of idiomatic COBOL.
Fun!