News for hackers. Stuff that matters.
Re:Learning COBOL: A Journey for the Modern Programmer by slowmotiony on Wednesday April 07, 2021 @01:59PM (#26728472)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by hindsightbias on Wednesday April 07, 2021 @03:37PM (#26729992)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by mathgorges on Wednesday April 07, 2021 @03:21PM (#26729734)
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

Re:Learning COBOL: A Journey for the Modern Programmer by chasil on Wednesday April 07, 2021 @04:58PM (#26731161)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by jdcaballerov on Wednesday April 07, 2021 @02:03PM (#26728539)
the videos on the resources cover JCL and other tools.
Re:Learning COBOL: A Journey for the Modern Programmer by the_af on Wednesday April 07, 2021 @02:09PM (#26728627)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by marktangotango on Wednesday April 07, 2021 @02:41PM (#26729108)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by bogomipz on Wednesday April 07, 2021 @04:46PM (#26731003)
>"... 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?

Re:Learning COBOL: A Journey for the Modern Programmer by marktangotango on Wednesday April 07, 2021 @05:07PM (#26731308)
Any city with telecom, airline headquarters, and financial services. This one has all three. Could be Chicago, and others.
Re:Learning COBOL: A Journey for the Modern Programmer by bogomipz on Wednesday April 07, 2021 @08:04PM (#26733274)
Interesting I always associate COBOL with banking I didn't know it was as equally entrenched in airlines and telecom as well.
Re:Learning COBOL: A Journey for the Modern Programmer by 908B64B197 on Wednesday April 07, 2021 @02:14PM (#26728711)
Keep in mind that everyone working in COBOL trying to squeeze costs.

It's a dead ecosystem.

Re:Learning COBOL: A Journey for the Modern Programmer by nullserver on Wednesday April 07, 2021 @04:04PM (#26730421)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by 908B64B197 on Wednesday April 07, 2021 @04:36PM (#26730864)
Do they have a critical dependency on it?
Re:Learning COBOL: A Journey for the Modern Programmer by nullserver on Wednesday April 07, 2021 @05:48PM (#26731809)
If it doesn’t work they go out of business.
Re:Learning COBOL: A Journey for the Modern Programmer by oweiler on Wednesday April 07, 2021 @06:29PM (#26732315)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by rudolfwinestock on Wednesday April 07, 2021 @07:53PM (#26733175)
I've noticed that people only speak highly of COBOL, as a technology, when Grace Murray Hopper's name occurs nearby.

That's all that I need to know about COBOL.

Re:Learning COBOL: A Journey for the Modern Programmer by nikisweeting on Wednesday April 07, 2021 @11:21AM (#26726210)
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...

Re:Learning COBOL: A Journey for the Modern Programmer by giantg2 on Wednesday April 07, 2021 @01:17PM (#26727821)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by rbanffy on Wednesday April 07, 2021 @01:54PM (#26728381)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by giantg2 on Wednesday April 07, 2021 @01:57PM (#26728427)
How much do you make?

Many of the postings I see are $250k+. That's like 3x what I make.

Re:Learning COBOL: A Journey for the Modern Programmer by slowmotiony on Wednesday April 07, 2021 @02:03PM (#26728531)
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 1000€+/day.
Re:Learning COBOL: A Journey for the Modern Programmer by rbanffy on Wednesday April 07, 2021 @02:02PM (#26728513)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by marktangotango on Wednesday April 07, 2021 @02:42PM (#26729132)
> Many of the postings I see are $250k+. That's like 3x what I make.

Proof please.

Re:Learning COBOL: A Journey for the Modern Programmer by giantg2 on Wednesday April 07, 2021 @03:11PM (#26729596)
Ah, I see. I was looking at consultant jobs. Regular jobs seem to be less.
Re:Learning COBOL: A Journey for the Modern Programmer by the_only_law on Wednesday April 07, 2021 @01:16PM (#26727815)
Wasn’t the plea a please for “volunteers” as well?
Re:Learning COBOL: A Journey for the Modern Programmer by AceStrider1 on Wednesday April 07, 2021 @12:27PM (#26727195)
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
Re:Learning COBOL: A Journey for the Modern Programmer by Diederich on Wednesday April 07, 2021 @01:30PM (#26728034)
> 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.

Re:Learning COBOL: A Journey for the Modern Programmer by marktangotango on Wednesday April 07, 2021 @05:11PM (#26731363)
> key words might be slightly diffrent. I ran inro this trying to port code to GNUCobol

Do you recall what those were specifically?

Re:Learning COBOL: A Journey for the Modern Programmer by Bostonian on Wednesday April 07, 2021 @12:24PM (#26727155)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by shakna on Wednesday April 07, 2021 @12:47PM (#26727473)
> 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).

Re:Learning COBOL: A Journey for the Modern Programmer by CountHackulus on Wednesday April 07, 2021 @01:05PM (#26727698)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by the_af on Wednesday April 07, 2021 @02:07PM (#26728591)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by Smithalicious on Wednesday April 07, 2021 @12:46PM (#26727458)
Maybe it's because I'm not a native English speaker but what does "divide into" mean?
Re:Learning COBOL: A Journey for the Modern Programmer by hn8788 on Wednesday April 07, 2021 @12:52PM (#26727522)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by jdcaballerov on Wednesday April 07, 2021 @02:24PM (#26728855)
Divide into is the opposite of Divide by. X2 into 1500 is 1500/X2
Re:Learning COBOL: A Journey for the Modern Programmer by forinti on Wednesday April 07, 2021 @12:51PM (#26727517)
DIVIDE X2 INTO 1500 GIVING Y => Y=1500/X2
Re:Learning COBOL: A Journey for the Modern Programmer by azhenley on Wednesday April 07, 2021 @12:24PM (#26727147)
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/

Re:Learning COBOL: A Journey for the Modern Programmer by aoleinik on Wednesday April 07, 2021 @01:56PM (#26728411)
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)

Re:Learning COBOL: A Journey for the Modern Programmer by the_af on Wednesday April 07, 2021 @02:05PM (#26728566)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by jmt_ on Wednesday April 07, 2021 @02:17PM (#26728740)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by lotsofpulp on Wednesday April 07, 2021 @04:26PM (#26730729)
>Out of curiosity, does knowing COBOL pay well in 2021?

Apparently not sufficiently "well" to prevent a "shortage" of COBOL programmers.

Re:Learning COBOL: A Journey for the Modern Programmer by guessbest on Wednesday April 07, 2021 @05:15PM (#26731422)
Senior mainframe programmers seem to get paid less than entry level java/SQL programmers where I work at.
Re:Learning COBOL: A Journey for the Modern Programmer by sillyquiet on Wednesday April 07, 2021 @02:17PM (#26728739)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by bogomipz on Wednesday April 07, 2021 @04:48PM (#26731041)
This course sounds really interesting. Do you remember if there was a text book or if there is any online syllabus for it?
Re:Learning COBOL: A Journey for the Modern Programmer by sillyquiet on Friday April 09, 2021 @10:14AM (#26750827)
This was 20 odd years ago, so I do not remember clearly if there was a text. I think there was not. Almost certainly no to the online syllabus as that professor is long retired and when I took the class he was still using overhead projector transparencies.
Re:Learning COBOL: A Journey for the Modern Programmer by giantg2 on Wednesday April 07, 2021 @01:13PM (#26727786)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by rbanffy on Wednesday April 07, 2021 @01:47PM (#26728283)
> The JCL is the harder part.

Even its creators say JCL is the worst language ever invented.

Re:Learning COBOL: A Journey for the Modern Programmer by p_l on Wednesday April 07, 2021 @03:59PM (#26730343)
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"
Re:Learning COBOL: A Journey for the Modern Programmer by rbanffy on Thursday April 08, 2021 @04:24AM (#26736366)
I think a lot of the pain from Terraform could have been avoided had they known of JCLs cruel fate.
Re:Learning COBOL: A Journey for the Modern Programmer by jhbadger on Wednesday April 07, 2021 @10:15PM (#26734331)
I found it interesting that the author found COBOL's use of line numbers strange and chalked it up to its origin in the punch card era. While that may have been part of it, those of us who learned programming via BASIC in the 1980s were very used to line numbers even though we never saw a punch card.
Re:Learning COBOL: A Journey for the Modern Programmer by dragonwriter on Wednesday April 07, 2021 @10:20PM (#26734377)
> I found it interesting that the author found COBOL's use of line numbers strange and chalked it up to its origin in the punch card era. While that may have been part of it, those of us who learned programming via BASIC in the 1980s were very used to line numbers even though we never saw a punch card.

BASIC is also from the punch card era; it is only 5 years newer than COBOL (1964 vs 1959).

Re:Learning COBOL: A Journey for the Modern Programmer by jhbadger on Wednesday April 07, 2021 @11:10PM (#26734679)
BASIC was designed as an interactive language on the Dartmouth Timesharing System rather than batch, though. It was assumed that the user was at a terminal (probably a teletype given the era) and could interact in real time with the computer rather than punching cards to be handed to an operator and receiving output later. The line numbers were there to aid editing code as a replacement line could be entered using the same line number as an existing line. This tradition carried into the home computers of the 1980s as they generally didn't use text editors as we know them for editing BASIC code.
Re:Learning COBOL: A Journey for the Modern Programmer by submeta on Wednesday April 07, 2021 @02:40PM (#26729088)
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?
Re:Learning COBOL: A Journey for the Modern Programmer by dragonwriter on Wednesday April 07, 2021 @06:42PM (#26732464)
> 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.

Re:Learning COBOL: A Journey for the Modern Programmer by mathgorges on Wednesday April 07, 2021 @03:29PM (#26729872)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by maiya9 on Wednesday April 07, 2021 @12:09PM (#26726946)
Really interesting, lots of good resources. Thanks!
Re:Learning COBOL: A Journey for the Modern Programmer by GoblinSlayer on Wednesday April 07, 2021 @12:32PM (#26727252)
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.
Re:Learning COBOL: A Journey for the Modern Programmer by dehrmann on Wednesday April 07, 2021 @12:53PM (#26727541)
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.

Re:Learning COBOL: A Journey for the Modern Programmer by GoblinSlayer on Thursday April 08, 2021 @02:07AM (#26735589)
The problem with COBOL is that you can't afford "better", you can only afford "good". Excel should be a sufficient demonstration that visual programming is doable beyond the start.
Re:Learning COBOL: A Journey for the Modern Programmer by giantg2 on Wednesday April 07, 2021 @01:09PM (#26727747)
Some SQL expressions can get extremely complex.
Re:Learning COBOL: A Journey for the Modern Programmer by dehrmann on Thursday April 08, 2021 @02:00AM (#26735552)
True, but imagine that in a query builder GUI.
Re:Learning COBOL: A Journey for the Modern Programmer by imperatorT on Wednesday April 07, 2021 @11:43AM (#26726543)
Wow, great article! Super interesting :)