[HN Gopher] Learning COBOL: A Journey for the Modern Programmer
       ___________________________________________________________________
        
       Learning COBOL: A Journey for the Modern Programmer
        
       Author : jdcaballerov
       Score  : 84 points
       Date   : 2021-04-07 15:14 UTC (7 hours ago)
        
 (HTM) web link (monadical.com)
 (TXT) w3m dump (monadical.com)
        
       | slowmotiony wrote:
       | Does anyone know of any good resources for learning basics of
       | JCL, datasets, jobs, the z/OS Host and so on? I find that when I
       | look at the screens of my mainframe colleagues, the COBOL code is
       | actually the only thing I can wrap my head around, as opposed to
       | all the weird mainframe tools built around it.
        
         | mathgorges wrote:
         | Theres almost certainly a more direct route, but I learned most
         | of these things (not really JCL) by learning HLASM from this
         | resource:
         | 
         | http://csc.columbusstate.edu/woolbright/WOOLBRIG.htm
        
         | hindsightbias wrote:
         | https://www.ibm.com/it-infrastructure/z/education
         | 
         | See the train for no cost or fee links at the bottom. I know
         | ISVs and BPs can get 5-day lab courses for free but IDK about
         | the general public.
        
         | jdcaballerov wrote:
         | the videos on the resources cover JCL and other tools.
        
         | chasil wrote:
         | I don't know anything about IBM operating systems, but I
         | understand that older versions of System/370 are free and can
         | be run on PCs via this famous emulator:
         | 
         | http://www.hercules-390.eu/
         | 
         | IBM absolutely hates that software.
        
       | AceStrider1 wrote:
       | But which COBOL? Microfocus now own RM/COBOL and AccuCOBOl, as
       | well as their own MicrFocus Cobol. These are for the IBM PC and
       | run on Windows, Unix, and Linux. Old code usually uses compiler
       | dependent extensions, and without a good amount of work, I can
       | not just recompile using a diffrent vendor's cobol. And if it
       | does happrn to compile it may not work because the expected
       | behaviour of implrmented language key words might be slightly
       | diffrent. I ran inro this trying to port code to GNUCobol
        
         | Diederich wrote:
         | > AccuCOBOl
         | 
         | That's a name I haven't read in a long time.
         | 
         | I wrote a bunch of this when I was in the USAF, 81st Medical
         | Group, back in the early/mid 1990s.
         | 
         | It had some neat features, including a robust, platform
         | independent GUI, and platform independent bytecode.
         | 
         | Specifically, you could write a GUI program in AcuCOBOL and
         | compile it, which resulted in a compact file that could then be
         | put on any other kind of computer that had the AcuCOBOL runtime
         | installed and then executed.
         | 
         | The GUI your program produced depended on the platform it was
         | running on. If, like us, running on
         | https://en.wikipedia.org/wiki/Aviion UNIX with nice big
         | x-terms, you'd get an X11 GUI, unless you set a specific
         | environment variable, in which case you'd get a nice curses-
         | like GUI. The DOS runtime produced...if memory serves...a kind
         | of curses-like, somewhat text based GUI.
         | 
         | Pretty neat stuff for the time.
        
         | marktangotango wrote:
         | > key words might be slightly diffrent. I ran inro this trying
         | to port code to GNUCobol
         | 
         | Do you recall what those were specifically?
        
       | maiya9 wrote:
       | Really interesting, lots of good resources. Thanks!
        
       | sillyquiet wrote:
       | I took a survey of historical programming languages course in
       | college that covered FORTRAN, COBOL, SNOBOL, Prolog, SmallTalk,
       | and several others of importance or uniqueness. Each section
       | required a small practical program be written in that language,
       | and we discussed each in its context of usage, 'family tree',
       | syntax etc
       | 
       | I guess I am saying programming history classes is where COBOL
       | belongs.
        
         | bogomipz wrote:
         | This course sounds really interesting. Do you remember if there
         | was a text book or if there is any online syllabus for it?
        
       | nikisweeting wrote:
       | I remember the government's plea for COBOL programmers last year
       | and was surprised we haven't seen that many more posts about it
       | since then.
       | 
       | https://nymag.com/intelligencer/2020/04/what-is-cobol-what-d...
       | 
       | https://onezero.medium.com/our-government-runs-on-a-60-year-...
       | 
       | Just this one yesterday:
       | 
       | https://www.govtech.com/opinion/An-Apology-to-COBOL-Maybe-Ol...
        
         | the_only_law wrote:
         | Wasn't the plea a please for "volunteers" as well?
        
         | giantg2 wrote:
         | Maybe if they took the time to train people and create a
         | sustainable talent pipeline then they wouldn't be in this
         | position. They only want experts and nobody want to train.
        
           | rbanffy wrote:
           | They are also somewhat underpaid. I'd totally like to be paid
           | to work on mainframes, even if writing COBOL code, but not by
           | taking a pay cut.
        
             | giantg2 wrote:
             | How much do you make?
             | 
             | Many of the postings I see are $250k+. That's like 3x what
             | I make.
        
               | rbanffy wrote:
               | I never saw one of those, but I don't think I could be a
               | senior COBOL developer. I'd need training on both
               | language and zOS.
        
               | slowmotiony wrote:
               | I think it depends on the skill. I see young programmers
               | from big companies like IBM or Accenture making peanuts
               | and working constant overtime while the older guys (I'm
               | talking 30 years experience) who are independent
               | consultants quote 1000EUR+/day.
        
               | marktangotango wrote:
               | > Many of the postings I see are $250k+. That's like 3x
               | what I make.
               | 
               | Proof please.
        
               | giantg2 wrote:
               | Ah, I see. I was looking at consultant jobs. Regular jobs
               | seem to be less.
        
       | GoblinSlayer wrote:
       | Isn't it a good case for visual programming? If you can't afford
       | programmers, then you go for something less demanding and throw
       | more cheap bodies at the problem.
        
         | dehrmann wrote:
         | My take on visual programming is it's easier to start out with,
         | but you're quickly better off using a conventional language
         | once you reach a certain scale or you need to manipulate your
         | program in certain ways.
         | 
         | Almost every time I see an expression builder in a UI, I think
         | it would be better off with SQL syntax and autocomplete because
         | the dropdowns get old fast, and SQL expressions aren't that
         | hard.
        
           | giantg2 wrote:
           | Some SQL expressions can get extremely complex.
        
       | giantg2 wrote:
       | Younger programmers aren't taking up the language because most
       | schools don't teach it and companies aren't interested in
       | training people. Most of the postings want experienced people
       | like senior devs, whether it's for COBOL or some other language.
       | 
       | I took COBOL in school and enjoyed it. The JCL is the harder
       | part. I thought about doing COBOL as a career, but there weren't
       | any entry level positions.
        
         | rbanffy wrote:
         | > The JCL is the harder part.
         | 
         | Even its creators say JCL is the worst language ever invented.
        
           | p_l wrote:
           | And gave the main reason as "because we tried to not make a
           | language so hard, the requirements evolved it into one in
           | form of exceptions rather than design"
        
       | submeta wrote:
       | Anyone attempted to write a COBOL code generator in a more
       | comfortable language? Or isn't code generation the problem,
       | rather the reading/modifying legacy code?
        
         | mathgorges wrote:
         | It's the latter.
         | 
         | COBOL development is nearly never greenfield, and many of the
         | (mainframe) systems you'll have to work with behave differently
         | than you'd expect if you're someone that learned about software
         | after the 80's.
        
         | dragonwriter wrote:
         | > Or isn't code generation the problem, rather the
         | reading/modifying legacy code?
         | 
         | Its this. If someone is doing greenfield z/OS development, I
         | would assume they are probably using a more modern language
         | (IBM highlights Java and C/C++ support on z/OS), not COBOL. But
         | there is tons of legacy code in COBOL - much of it that was
         | never well-documented. Sure, there's fewer available COBOL
         | programmers, but in many cases the orgs with these systems have
         | also lost most of the people that were serving as living
         | documentation, which is not great when the system is operating
         | in near-steady-state, but becomes a critical problem when it
         | needs new changes. So, the COBOL programmers they tend to need
         | are for code archeology, temporally-displaced mind-reading to
         | understand the original _intent_ of code and diff it with
         | emergent requirements, and maintenance on legacy systems.
        
       | imperatorT wrote:
       | Wow, great article! Super interesting :)
        
       | the_af wrote:
       | I suppose it's again that time of the year when there's a flood
       | of articles trying to convince people that COBOL is worth
       | learning, that it's been updated or that it pays really well, and
       | that there are lots of hidden opportunities for you to make big
       | money working with COBOL!
       | 
       | Those of us who actually worked with COBOL aren't fooled though.
       | It bears repeating: COBOL is a horrible language and it's often
       | used in legacy banking systems. Learn it at your own peril,
       | especially when there are way more interesting languages and jobs
       | out there.
        
         | 908B64B197 wrote:
         | Keep in mind that everyone working in COBOL trying to squeeze
         | costs.
         | 
         | It's a dead ecosystem.
        
           | nullserver wrote:
           | This.
           | 
           | On a different language, but same mindset.
           | 
           | System is many years outdated and no one understands it.
           | 
           | Get a ticket. "Fix all the problems"
           | 
           | Me "Umm okay. Hire 20 people and give us 3 years."
           | 
           | Them: you have a week by yourself.
           | 
           | 14 months later their standpoint is it's always one more week
           | left.
           | 
           | I can't tell if they even see the absurdity anymore.
        
             | 908B64B197 wrote:
             | Do they have a critical dependency on it?
        
               | nullserver wrote:
               | If it doesn't work they go out of business.
        
         | oweiler wrote:
         | It also doesn't seem to pay _that_ well. I would expect too
         | earn 2-4 times as much as a Java dev but that doesn 't seem to
         | be the case.
        
         | marktangotango wrote:
         | So much this, I work in a city with literally thousands of
         | former cobol developers who's jobs were offshored over the past
         | two decades. Check online jobs boards, there is very very
         | little demand for this skill, shortage is myth.
        
           | bogomipz wrote:
           | >"... I work in a city with literally thousands of former
           | cobol developers who's jobs were offshored over the past two
           | decades."
           | 
           | I was intrigued by this. Can you say what city and why there
           | are so many Cobol developers there?
        
             | marktangotango wrote:
             | Any city with telecom, airline headquarters, and financial
             | services. This one has all three. Could be Chicago, and
             | others.
        
       | aoleinik wrote:
       | Out of curiosity, does knowing COBOL pay well in 2021? It seems
       | COBOL programmers are in critical demand and free market
       | economics should mean that COBOL programmers get paid premiums.
       | 
       | I would research this by myself, but not really sure where to
       | start - and googling "COBOL Developer Salary" leads to results in
       | the 80-120k range (which is no small number, but not
       | significantly different from a modern language developer)
        
         | the_af wrote:
         | No, it doesn't, at least not in my country (not the US).
         | 
         | It's a falsehood that often gets repeated. No, COBOL jobs don't
         | pay particularly well. Plus they have the downside of, you
         | know, having to work with COBOL, a horrible programming
         | language. And mostly at banks and financial institutions, the
         | main users of legacy COBOL systems.
        
           | jmt_ wrote:
           | I would also assume companies/banks hiring COBOL programmers
           | are more interested in candidates with years of experience
           | with the language, since opportunities to build and grow with
           | COBOL seem pretty slim outside of legacy maintenance.
           | Granted, the old COBOL heavy hitters are becoming less
           | common, but I would still think it would be difficult for
           | someone that picked it up for a year or two to compete. Seems
           | like it's just not worth the time and effort to break into
           | this space.
        
         | guessbest wrote:
         | Senior mainframe programmers seem to get paid less than entry
         | level java/SQL programmers where I work at.
        
         | lotsofpulp wrote:
         | >Out of curiosity, does knowing COBOL pay well in 2021?
         | 
         | Apparently not sufficiently "well" to prevent a "shortage" of
         | COBOL programmers.
        
       | azhenley wrote:
       | Guess I'll switch to teaching COBOL in my undergrad courses!
       | 
       | Interestingly, there is a AI startup that focuses on dev tools
       | for COBOL: https://www.phasechange.ai/
        
       | Bostonian wrote:
       | Looking at COBOL code such as                  PERFORM N TIMES
       | ADD 1 TO I          DIVIDE X2 INTO 1500 GIVING Y
       | SUBTRACT Y FROM 815 GIVING Y          DIVIDE X1 INTO Y
       | MOVE X1 TO X2          SUBTRACT Y FROM 108 GIVING X1
       | DISPLAY I'|'X1         END-PERFORM.
       | 
       | I wonder if someone has written a Python-to-Cobol translator so
       | that you can program using regular math notation and then
       | translate that into wordy Cobol.
        
         | Smithalicious wrote:
         | Maybe it's because I'm not a native English speaker but what
         | does "divide into" mean?
        
           | forinti wrote:
           | DIVIDE X2 INTO 1500 GIVING Y => Y=1500/X2
        
           | hn8788 wrote:
           | I'm a native English speaker, and I've never heard that
           | phrase either. I assume it's the same as "divide by", but I
           | could be wrong.
        
             | jdcaballerov wrote:
             | Divide into is the opposite of Divide by. X2 into 1500 is
             | 1500/X2
        
         | shakna wrote:
         | > I wonder if someone has written a Python-to-Cobol translator
         | so that you can program using regular math notation and then
         | translate that into wordy Cobol.
         | 
         | Yes. But worse. And used in the real world.
         | 
         | Whilst I cannot give all the details for obvious reasons, when
         | I was assisting a particular bank with translating some of
         | their stack from COBOL to modern Fortran, part of the problem
         | was that a large amount of their COBOL code was actually
         | generated.
         | 
         | It wasn't a Pythonish-to-COBOL, though. It was a mix of the
         | C-preprocessor and Bash that generated the COBOL code.
         | 
         | (Problem for me was that all source code was printed, and not
         | stored anywhere digitally, so I had to restore that evil
         | Bash/CPP script just to be able to restore the code I had to
         | retype by hand).
        
           | CountHackulus wrote:
           | This is more common than you might think. Back when I worked
           | on a COBOL compiler at IBM one of our test cases was an
           | "expert system" that turned ~20 lines of business-specific
           | DSL into ~100k lines of COBOL. It was extremely un-fun to
           | deal with.
        
         | the_af wrote:
         | Looks like the COBOL I saw when working at a bank, years ago.
         | And it wasn't the output of any automated translation.
         | 
         | COBOL is simply horrible. Avoid it if you can.
        
       ___________________________________________________________________
       (page generated 2021-04-07 23:02 UTC)