Walt Mankowski on 28 Sep 2018 17:57:02 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] COBOL again


On Tue, Sep 25, 2018 at 05:09:52PM -0400, JP Vossen wrote:
> We've talked about this a few times, especially after one of Walt's COBOL
> talks: https://developers.slashdot.org/story/18/09/25/1759250/do-you-know-cobol-if-so-there-might-be-a-job-for-you

At this year's !!Con I learned from one of the attendees that there's
a university in Ontario that still teaches COBOL. That's because the
nearby Ontario Forestry Ministry's systems use the language, and the
grads provide a steady and dependable source of new labor.

> I just started wondering about this though, just because the language is
> Cobol doesn't mean modern techniques can't be used.  Can you do this remote?
> Is the code in Git?  Can there be unit tests, CI, and all of that good
> stuff?  COBOL linters?

There aren't any technical reasons they can't do this. I imagine the
problem's more the expense and general hassle of trying to get them to
run on mainframes. It's a very different environment.

> Wow:
> * https://github.com/tollofsen/linter-cobc
> * https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis
> 
> What Cobol is even used?  The Mint repos have "Open COBOL" but that
> "translates COBOL into C and compiles the translated code using GCC" which
> feels like cheating.  Presumably production is IBM COBOL or related, so I
> wonder how close the two are.  I'm gonna go out on a limb and say that a
> Linux test/dev system would be a tad cheaper than a Z-series...
> 
> Huh, it doesn't seem like there are a lot of options:
> https://en.wikipedia.org/wiki/List_of_compilers#COBOL_compilers

Yeah, the two big ones I was aware of IBM and Micro Focus. One that's
missing from that list is Stratus's compiler for their VOS
platform. (That's the one we used at QVC.)

Why is compiling into C "cheating"? In my limited experience you never
even see that intermediate C code; you get .o files and executables
just like any other compilers. That said, I'm not really sure why they
do it that way. Maybe it makes it easier to call 3rd party libraries?

> There are lots of books on Amazon (including, seriously, _COBOL for
> Dummies_) but many seem out of print or insanely expensive (or both).

The GNUCobol Programmer's Guide has a nice introduction to the
language, and it's free:

https://open-cobol.sourceforge.io/guides/GnuCOBOL%202.2%20NOV2017%20Programmers%20Guide%20(US%20Letter).pdf

Walt

Attachment: signature.asc
Description: PGP signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug