COBOL for Node.js |
Written by Kay Ewbank | |||
Wednesday, 19 August 2015 | |||
If you had to come up with unlikely language pairings, COBOL and Node.js would score pretty highly as a “least likely to be used together” choice. However, if for some reason you decide your legacy COBOL application needs to be instantly available on the Web, there is now a solution. Romanian Web developer Bizău Ionică has created a COBOL bridge for Node.js called Node-COBOL. This hasn’t been done to meet some as-yet unforeseen COBOL crisis; instead, Ionică did it because he thought it would be funny. In an email explaining his thinking to IProgrammer he said: “Since I learned a little bit of COBOL, just for fun, I thought it would be interesting to link it to an actual programming language: Node.js. I wrote this project in few hours, more for fun than for a real-world benefit, but the feedback I got was unexpected – lots of people are talking about it. I even noticed people who said the project could be used for embedding some old COBOL legacy code into a migrated project to NodeJS (maybe a website or a web service). From what I read, COBOL is still used a lot and it is secured enough, so I think that embedding it into modern applications makes more sense than migrating all the code.” Ionică says he’s not a COBOL expert, just an enthusiast. The project is being hosted on Github, and gives you a way to run COBOL code from Node.js, the server-side JavaScript platform (this explanation is especially for COBOL programmers who haven’t really heard of Node.js or perhaps the internet). Source: Computer History Museum
For JavaScript programmers hazy about COBOL, the acronym stands for Common Business-Oriented Language.and it is a language based on the principle advocated by Grace Hopper that code should try to be close to plain English. Hopper herself taught it to the Navy back in the days when blackboards were the main, and sometimes only presentation device. The way Node-COBOL works is that you use the GnuCOBOL compiler. You provide the COBOL code as input, and GnuCOBOL builds the executable in the background and runs it. Bizau says that this means you have full control of the COBOL code you send, so you can provide command line arguments. He thinks that one improvement would be to use a JavaScript-based COBOL compiler to compile the input so there would be no need to have GnuCOBOL as a dependency. In actual fact, there is a lot of COBOL code running, and while a lot of it is still running because it can’t be changed due to the original source code being lost, there are a number of government, banking and insurance systems that are still COBOL based because the language still meets the needs of the industries concerned. The US Federal Reserve Bank and the IRS use COBOL for some systems. COBOL was placed at 13 in the 2015 TIOBE index in which JavaScript came top, and a search on job site Dice.com this week shows up 523 jobs for developers with COBOL skills. Ionică says that Node-COBOL is ready production ready, and if anyone feels like using it in production, they only have to ask. So, somewhere in the loft I still have that box of punched cards for my COBOL masterpiece, complete with pink OS/360 JCL cards. All I need now is a card reader, and I’m in business. As Ionică says, “COBOL doesn’t die, it survives. Let's bring COBOL back!”
More Information
Related ArticlesGrace Hopper - The Mother of Cobol Computer Languages by Committee - the 1960s
To be informed about new articles on I Programmer subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
Comments
or email your comment to: comments@i-programmer.info
|
|||
Last Updated ( Wednesday, 19 August 2015 ) |