Reputation: 2987
I like to come in touch with compiling and debugging for the COBOL language. What components and independencies are there, for a working near-real-life-as-possible environment?
Is it possible, in a Win32 environment? Or a modern Intel architecture? If so, are there specific bootup, operating system or hardware needed, what more / any?
I was looked at IBM z/OS which not looks like something for 'kids' that aim against a future of full-scale business environment. It also appears to be for z/ architecture processors, nothing you bring "home and start with" like it would with SCALA, Ruby, Haskell and such.
Most of my Google-time give light over OpenCOBOL, MX Cobol plus some more sibblings. I haven't tried those and not sure that they apply what I search for.
When I read about those, looking at the problematic that users are commenting, reading the environment FAQ, those software-packets looks like some kind of Sandboxes that make COBOL but with a little "extra extra". There even exist VS .NET implementations of COBOL and GUI's for the development environment! That's why i don't tag OpenCobol and NetCobol.
I looking further a simple "hello world", "array[0..10]", "obj = new objectY" "y | y == false"
(language intro of course begin with syntax). The purpose is to came in touch with common business tasks, which have purposes. I.e. read in/out data files, create and use connection against MSSQL, take inputs from a executing software or script and such.
Upvotes: 1
Views: 1444
Reputation: 4643
Our company has been developing in Cobol for over 25 years. We are still writing new code every day. Our system contains about 4 million lines of modularised Cobol code and is used by many organisations in New Zealand and Australia.
We started using the Ryan-McFarlane (RM) Cobol but switched to AcuCorp's AcuCobol about 20 years ago. They were bought out by Micro-Focus a couple of years ago, but the AcuCobol stuff is still there as "Extend". This is a truly modern Cobol that can inter-operate with Java, does client-server, is multi-threaded, can provide web-services, etc. etc. and it is also very platform-independent. You can use this Cobol on any current Windows version, dozens of Unix flavours (including many versions of Linux), as well as the old mainframe platforms. It also is a brilliant example of the "compile once, run everywhere" paradigm, as we only compile our programs on one machine, but the software runs exactly the same way on many different platforms (Linux, Solaris, AIX, HP/UX, etc.)
I believe you can download a 30-day evaluation version of the Extend compiler/runtime.
By the way, I have no connection with Micro-Focus except as a satisfied customer.
Upvotes: 1
Reputation: 464
OpenCOBOL is probably your best best for learning as an intro or a hobby. It's FOSS and reasonably well supported. Grab a redbook or an online tutorial and go to it.
Everything else is going to cost you money. Fujitsu COBOL is probably the most commonly used COBOL on x86 processors, at least in my experience but it's not cheap.
You're right that a z/OS implementation is not super easy. It generally is run on a mainframe. However, COBOL is also most frequently found in this same environment. There are emulators for z/OS out there, but I don't think they're legal. IBM is pretty strict on copyright.
Upvotes: 2
Reputation: 4263
Hmmm, some simple samples:
"Hello World"
Display "Hello World"
"array[0..10]" (lets assume of int)
01 My-Array-Area.
02 My-Array occurs 11 pic s9(8) binary.
"obj - new objectY" (assume obj is declared as object reference)
Invoke objectY new returning obj
"x | y == false" ("y" a relational condition would have to be named differently from "y" a variable unless you did group qualification, so I changed one to x)
if (x or (y = false))
...do stuff...
else
...do other stuff...
end-if
Upvotes: 1