I wonder, is this actually used anywhere? Or is it just for fun?
I expect in some bank somewhere, node.js-COBOL integration really happens, but more commonly using web services (REST or SOAP). Take the legacy COBOL application, turn it into a web service, then clients like node.js can call it. Popular COBOL application frameworks – such as CICS and Tuxedo – include support for writing SOAP and REST web services in COBOL, which are generally used to add web service endpoints to existing COBOL applications.
While I didn't personally work on the Cobol side, I worked at a company on the consuming side. The whole thing was rather fun. The Cobol code would literally enter data into screens. Sometimes the screen data input was slowed to mirror that of a human. The result from each screen were known to fit in character matrixes. They would scrape the matrix into some data structure and move to the next screen by tabs and enter key presses. After the proper screens were polled, the data was rolled up and returned.
The Cobol guys liked to mock the Java team. They said that Java was slow. They pointed to how our system interacted with theirs. So one day for UAT I got permission to make async calls to their services. BAM! Mainframe was hit hard. The Cobol guys were swearing. They couldn't understand what nearly took down their system. Turns out all it took was a thread pool of 100. We ended up using the async wrappers around time-sensitive sections with only 10 or so threads, if I recall properly.
I cut my teeth writing cobol back during the Y2K thing... I think I might have been the only college student they interviewed that had cobol on the resume. It was 20 years ago but I don't remember it being any more painful than some of the other crap I've had to deal with over the years. I'd definitely brush it off for $500k :)
I've never used cobol, but I'm pretty sure doing so would fail. "node-exec-path.cbl" is for this, you can give it a path to a script to run. The example uses it as
CALL 'EXEC_NODEJS_FILE' USING "example/server.js".
Alternatively, you can escape double quotations to \" and they'll work with node -e (I'm pretty sure it's not doing this automatically though).
I think I found another bug too, my only experience with cobol is the 10 minutes spent trying to understand this, so maybe someone can explain? Since in EXEC_NODEJS, NODEJS_CODE is defined as "NODEJS_CODE PIC A(100)", doesn't that limit it to 100 alphabetic characters, so even the example of "console.log('Hello World!')" would not work because of the period, parentheses, and exclamation mark?
My first job as a developer was writing COBOL (in 2007), and I only did it for a few months, so grain of salt here. I'm fairly certain PIC A(100) should be PIC X(100). A is "alphabetic." X is "alphanumeric" but supports ASCII characters that aren't a-z or 0-9.
That said, COBOL is weakly typed, so you can probably store non-alphabetic characters in a variable typed as alphabetic (at least without the compiler correcting you), but it might fail if you try to do certain operations on them.
I can't say how useful this might be in the real world, but I appreciate the out of the box thinking. It could be more useful if you could call Python or Perl from the COBOL program, but what do I know.
One thing for sure: I will find a way to use this somehow. :)
Just the Javascript module the world was waiting on! I'm sure this will have a meaningful impact! /s
In seriousness: My dad was a COBOL programmer for about 30 years. It would frustrate him to no end to look upon Javascript programmers and to tell him, "these guys are going to be working on your code now."
I'd never advocate COBOL or anything, but I'm just saying that it took a certain breed of person to do it, and that those people aren't around anymore is a sad thing.
Out of curiosity, is it a very lucrative trade anymore? My dad has always wanted me to learn the trade, I've always assumed it's that paternal 'pass the baton to the seed' instinct, and I've never bothered because I've always been afraid that most shops wouldn't give any real consideration to a millenial who says he can program mainframes.
Has this been similar to your experience? I'm just curious because it's not a very typical thing, square peg in a round hole sort of situation.
Not the OP, but I'm of similar age and also a mainframe programmer by trade. It's a pretty lucrative field to be into, especially because the businesses which operate mainframes tend to be very large and (mostly) stable corporations. While not as hip and cool as a Valley startup, there is something to being well paid and receiving good health and retirement benefits! =)
Those same corporations are also not blind to the fact that most of their COBOL workforce will be retiring, en mass, in the coming years, and are quite desperate to hire anyone willing to learn. My employer paid for me to attend a 3 month training program in order to learn how to use and develop on the IBM zSeries mainframe. It was a fantastic experience. As well, those same companies are looking to move as much of their COBOL code off of the mainframe and onto a distributed, server platform. While you can't beat the sheer power of Big Iron chugging along through a batch cycle, the CICS user interface leaves a lot to be desired. It's much more cost and time effective to build a web interface that talks to a Java middle-layer that lives on the mainframe (such that it can directly talk with DB2 or some such), compared to designing, building, and testing a CICS program to do the same thing, yet in a much more ugly fashion.
Whoa, that is super cool about how they trained you and everything. I have actually heard bits and pieces of sort of like folklore from my dad about CICS and other mainframe pop culture, it's always fascinated me in a certain sense. That there's another whole universe of programming that most people have never heard of or been involved with.
I'm actually in the process of getting involved with the US Army now (I'm 21) so that I can get some schooling and stuff done later, but I've thought that I might spend my off-time for the next few years trying to self-teach myself NetREXX or something and try to land a job in some MegaCorp. I'm not opposed to writing code all day in a comfy office chair with full benefits etc, especially compared to living in a dorm with couple dudes eating Ramen and trying to conquer Web 4.0 or whatever. Just doesn't appeal to me.
It's reassuring that it's a viable career path, I hadn't thought much about the new generation of mainframe maintenance, but from what my dad has told me about some of the people he's worked with it certainly makes sense that these big corps would be desperate for fresh meat right about now.
The plus side is that modern mainframes are really cool. It's not like they're still systems from the 70s, they are practically supercomputers with some of the fastest hardware ever made. (zEC12 was a 6-core, 5.5Ghz processor with very competitive IPC and monstrous cache; I believe it even had functional transactional memory too coughIntelcough. Now stuff 20 of those into a computer.)
Downside of course is COBOL, Java, etc. But it's not like it's going anywhere soon. Nobody really wants to replace millions of lines of COBOL that work, and work well.
Writing a compiler for an ML-ish language that targets COBOL would be kind of amusing. Just because they're stuck with COBOL doesn't mean it has to be hand-written, right?
Disclaimer: I don't work with mainframes but I know people who do. Friend of mine quite likes writing assembly for z/Architecture. I don't know if she's totally sane.
FWIW, where I was you didn't need the power of a big mainframe anymore and because of the size of the database you could actually buy a super beefy x86 machine with hundreds of gigabytes of RAM that could store the entire DB in RAM.
However, rewriting 30+ years of legacy code was very difficult. The place had tried and failed on two occasions so far to do it.
It seemed a bit like the airline reservation software system GDS and how it's still around.
Hey I'm a noob, can anybody expand upon what other languages are used to program mainframes? Is there any indication that COBOL will eventually be traded out for something newer?
Not the OP, but we have opportunities at our company for people who can operate in both worlds. We run a settlement/clearing system for payment processing, which is a zOS/UniKix/COBOL/JCL kind of system. I've been frustrated with treating the mainframe system as an island that can only be communicated with through batch jobs and batch reporting. So what we've been looking for are developers with a dual skill set to bridge the divide from the mainframe world to the rest of the company's C#/.Net application infrastructure. We have found some guys that have 20+ years experience with COBOL, who then started working on .Net or Java applications in the last decade. It's humbling to me to work with guys who are, in some sense, well into their second career, and are incredibly productive in both worlds. However, we've also had some who just couldn't make the transition out of the mainframe world. But we would also be interested in millennials, or anyone of any age, who could, say, work with JCL and COBOL and also write microservices in C#. Anyone with those skills and in the Dallas area, please reach out to me.
What sort of training do you give people to get into the mainframe world?
Where I worked people were always saying how they'd like mainframe people and would train them up but when actually asked about training, well, things became quieter.
Lucrative? No, but someone has to maintain the legacy nightmare. Most mainframe developers (i've run into) are very close to retirement age, so companies are trying to hire younger talent and will often put them through paid mainframe programming classes.
But mainframe sucks. Nobody gets into it cause the like it, they just need a job. I'd like to see a startup that sells mainframe software, cause they'd be be like one of 3 people.
I've had similar ideas, and I've tossed a couple back and forth to my Dad but the problem that I've always run into is that it is REALLY hard to sell those sort of solutions to companies already locked-in to COBOL and Rexx and PL/I, etc.
Retooling all of that is hard, and while avoiding that problem they kind of set themselves up to those legacy problems. Java shops kinda have seen the same thing except that while Java grew with the times, COBOL and friends just stagnated. The world kept turning though, and that's brought us to the situation of these 40 year programmers leaving behind forty years of code that basically only THEY can really understand.
I'm not the poster, but I have a story which might elucidate this.
The application I was working on, which had a C++ front end for a mainframe with three databases involved caused an IMS segment to crash. The guy who saw the message got in touch with our senior user and discovered exactly who was doing something to cause the IMS segment to crash. This was at about 4:30 on a Friday in a corporate government type office where about 4 out of 5 people had already gone home.
Within 30 minutes he had examined the crash dump, pulled out the COBOL program that had caused the issue and found the constant that had been set 20 years ago that had now been validated. He quickly go the user to alter the case so it didn't happen and he and I put in place new higher constants to protect the data from being damaged in future.
It was damn impressive.
But well, there are guys like Raymond Chen at MS who can do this for windows programs and in about 20 years, when node.js often means terrible hacked together code there will be JS gurus who can do the same.
But if the mainframe systems are still in operation, we have to hope those COBOL guys are still around.
Nothing wrong with that legally or ethically. It's just one of those things that is slightly stigmatized, similar to the way that COBOL itself is stigmatized or if you ask for ketchup on your hotdog while in Chicago.
That's just some half-assed lame custom that has no particular justification behind it. The age of consent is usually no more than 18 pretty much everywhere (at least in the US, where most of the HN posters seem to be), so I don't see any problem with a 50 year old guy on a date with a 20-something.
I figure anybody complaining is probably just jealous. But I'm close to 50 than 20 myself, so I'm not exactly unbiased. :-)
More like people are biologically encouraged to be attracted to the best possible mate (that whole evolution thing). It just so happens that this is generally women in their early to mid 20s and men in their late 20s and early 30s.
While standards for beauty may change to some extent across cultures and time, the attraction based on age has been very constant. In addition to the biological health of the species, humans perception of the world tend to change as they age. People of more similar age are more likely to have compatible and relatable life experiences and views (try explaining what the world was like before 9/11 to a teenager. They simply don't understand the huge shift in culture that resulted because they weren't aware of the world at that time and only know the world as it is today)
Ageism and sexism are problems in some areas, but biological attraction when forming relationships is not one of those areas.
I expect in some bank somewhere, node.js-COBOL integration really happens, but more commonly using web services (REST or SOAP). Take the legacy COBOL application, turn it into a web service, then clients like node.js can call it. Popular COBOL application frameworks – such as CICS and Tuxedo – include support for writing SOAP and REST web services in COBOL, which are generally used to add web service endpoints to existing COBOL applications.