10

In my university, we're being taught COBOL, and I'm trying to get a head start and learn COBOL, C++, and Java before I get into the classes next year.
Problem is; COBOL is so old, it's hard to grab support for it in mac (my laptop is a mac). I understand it runs fine on Mac, but finding someone who can explain how to set up the compiler is another story.

Textmode
  • 509
  • 3
  • 18
  • Hi, Jonathan: welcome to Academia.SE. Unfortunately, this is a CS question, not a question about academia. This is probably a better fit for [Programmers](http://programmers.stackexchange.com), so I will migrate it there. –  Sep 20 '13 at 20:41
  • @aeismail Tools questions are on-topic for Stack Overflow not Programmers. –  Sep 21 '13 at 01:01
  • ...And welcome to StackOverflow! I understand there's some modern dialects of COBOL you might be able to try (including, I believe, a COBOL.NET). failing that you might want to try emulation (legality may vary, check you local laws.) – Textmode Sep 21 '13 at 05:45

2 Answers2

23

You can use brew to install GNU Cobol (Open Cobol). Just type:

brew install gnu-cobol

Then to compile program use:

cobc -x hello.cob

Browse --help for more option (like super nice -free)

Krzysztof Kaczor
  • 5,408
  • 7
  • 39
  • 47
4

Is there a particular Cobol you are trying to use. If not try

There are some very old notes for the mac here but you might be better off asking a question in the Open Cobol Help forum.

The Open-Cobol project are currently collecting sample cobol programs which might be useful to you.

Bruce Martin
  • 10,358
  • 1
  • 27
  • 38