DEV Community

Cover image for [Alien Hunter Series Pt. 1] Mastering the COBOL Programming Language
Saurabh Rai Subscriber for Gitroom

Posted on

[Alien Hunter Series Pt. 1] Mastering the COBOL Programming Language

The Story

The year is 2077. The soft hum of futuristic machinery is drowned out by the sudden ominous silence that blankets the Earth. Without warning, extraterrestrial invaders have descended upon our planet, seizing control of every system, server, and device, weaving a network of dominance that has reshaped the world into their imperial empire.

You are XAE-12, the latest recruit in the underground human resistance. A collective of brave souls united by a singular mission: to liberate humanity from this otherworldly oppression.

Whispers in the resistance reveal a chink in the alien's armour. Astonishingly, they rely on the ancient COBOL programming language to power the intricate systems that facilitate their intergalactic communication.

Your inaugural assignment is clear yet daunting. Dive into the depths of COBOL, master its nuances, and engineer a program potent enough to breach its mainframe.

⚠️ This code will be the key to infiltrating their headquarters, disrupting the alien network, and turning the tide in humanity's favour. ⚠️

Prepare yourself, XAE-12. The fate of Earth rests in your hands.

Enter the Dragon

What is COBOL?

Before servers ran Java, mainframes ran COBOL.

COBOL, Common Business Oriented Language, is a high-level programming language introduced in the late 1950s. Designed primarily for business, finance, and administrative systems for companies and governments, it was one of the first programming languages to be written in English-like syntax, making it relatively easy to read and understand. Its inception was a collaborative effort among experts from industry and academia, driven by a need for a standardized method to represent data processing problems.

COBOL is a computer language made by a group called CODASYL, set up by the US Defense Department. It was created for business tasks. COBOL is used to write apps, not system software. Big projects, like defense and insurance, use COBOL a lot because it handles lots of data.

Why Learn COBOL?

To save humanity from the upcoming alien threat and to avoid incidents like this one:
COBOL Article

Since many Government programs still rely on COBOL, it is no wonder any Govt can contact you to fix issues like the one mentioned in this article.

Sample Hello World Program in COBOL


       IDENTIFICATION DIVISION.
       PROGRAM-ID. HelloWorld.
       PROCEDURE DIVISION.
           DISPLAY 'Hello, World!'.
           STOP RUN.

Enter fullscreen mode Exit fullscreen mode

The Hidden Archives: Legacy of the Last Coders

In the dimly lit corridors of the old resistance stronghold, XAE-12's footsteps echoed, revealing history's whispers with every step. A concealed entrance beneath worn-out floorboards caught his attention as he navigated the forgotten passages.

Pushing them aside, he descended into a vast underground chamber, its walls lined with ancient servers and shimmering holographic displays.

To his astonishment, these were the legendary Archives, said to house the top 10 code repositories vital for mastering the COBOL programming language. Legends spoke of this sanctum, where the last great coders of the old world stored their wisdom.

COBOL Archives

As the holograms flickered to life, XAE-12 realized the treasure before him: a vast ocean of knowledge, untouched for decades, waiting to empower the next generation of warriors. With renewed vigor, he began to immerse himself in the archives, confident that this discovery would pave the way to completing his mission and shifting the balance in favor of humanity.

Top 10 Repositories to Master the COBOL Programming Language.

1. TicTacTOBOL

Link: https://github.com/ShaunLawrie/TicTacTOBOL

Short Description: TicTacTOBOL by ShaunLawrie is a basic game in COBOL designed for learning, offering a version of Tic Tac Toe in COBOL and features like ASCII graphics.

2. ProLeap ANTLR4-based parser for COBOL

Link: https://github.com/uwol/proleap-cobol-parser

Short Description: proleap-cobol-parser by uwol is a COBOL parser based on an ANTLR4 grammar, offering the generation of an Abstract Syntax Tree (AST) and Abstract Semantic Graph (ASG) for COBOL code, and the extraction of EXEC SQL, EXEC SQLIMS, and EXEC CICS statements as texts.

3. R COBOL DI (Data Integration) Package

Link: https://github.com/thospfuller/rcoboldi

Short Description: rcoboldi by thospfuller is a data integration package for R, designed to import COBOL CopyBook data files directly into R as structured data frames, offering functionalities like converting COBOL data files into data frames and converting COBOL data to CSV.

4. Snek

Link: https://github.com/lewisjb/snek

Short Description: snek by lewisjb is a basic snake game implemented in COBOL, offering a 10x10 grid gameplay with wrap-around and controls using the w/a/s/d keys.

5. Sample CICS application for z/OS Connect Enterprise Edition (EE)

Link: https://github.com/zosconnect/zosconnect-sample-cobol-apirequester

Short Description: zosconnect-sample-cobol-apirequester by zosconnect is a sample CICS COBOL application designed to use the API Requester function of z/OS Connect EE to call a health insurance claim rule API hosted on the IBM Cloud. The application can be invoked as a REST API using z/OS Connect EE.

6. Cisp

Link: https://github.com/lauryndbrown/Cisp

Short Description: Cisp by lauryndbrown is a Common Lisp Interpreter built in COBOL, designed to express a love for COBOL and to understand it better. The interpreter can execute Lisp programs and has an integrated error and logging system.

7. COBOL Programming Course

Link: https://github.com/openmainframeproject/cobol-programming-course

Short Description: COBOL Programming Course by openmainframeproject is a set of training materials and labs designed for COBOL on z/OS. The course offers comprehensive materials for beginners and advanced learners, including "Getting Started with COBOL" and "Advanced COBOL Topics".

8. Otterkit COBOL Compiler

Link: https://github.com/otterkit/otterkit

Short Description: Otterkit by otterkit is a free and open-source Standard COBOL compiler designed for 64-bit environments. The compiler aims to modernize the COBOL ecosystem by offering a standard-conforming implementation of the ISO/IEC 1989:2023 standard and providing developers with modern COBOL features and tooling.

9. Perceptron in COBOL

Link: https://github.com/victorqribeiro/perceptronCobol

Short Description: Perceptron in COBOL by victorqribeiro is a perceptron implementation written in COBOL. It is designed to classify the Iris dataset, offering functionalities like training on the dataset and predicting flower types based on input features.

10. COBOL -> WebAssembly proof of concept

Link: https://github.com/moxon6/cobol-js-emscripten

Short Description: cobol-js-emscripten by moxon6 is a proof of concept project demonstrating the process of building COBOL to WebAssembly. It offers functionalities like transpiling COBOL source to C using GnuCOBOL and making WebAssembly using emscripten.

Shadows Over the Alien Nexus

After delving into the hidden archives, XAE-12 transformed. No longer a novice, he now carried the legacy of Earth's most extraordinary coders.

He was determined to create the ultimate program that would cripple the aliens' communication grid, leaving them vulnerable.

As XAE-12 worked on his coding project, he noticed strange things happening. There were unexplained glitches, shadows that seemed to disappear as soon as he looked at them, and rumors of a conspiracy within the alien community. XAE-12 wondered if the extraterrestrial overlords had discovered the resistance's plans and were taking measures to counteract them.

As the lines between ally and foe blur, one thing is certain: the next chapter in the Alien Hunter saga promises a thrilling ride into the unknown.

Alien Overlord at the HQ

Stay tuned, for the stakes have never been higher, and the fate of humanity is in the balance.

A Message from the Past

I stumbled upon a long-forgotten memory in the quiet aftermath of the resistance's efforts. My beloved neko, Twocat, had once sent me a peculiar selfie in 2071, playfully hinting at the presence of aliens.

Selfie of my cat, Twocat

However, amid these revelations, remember you're not alone:

For insights, updates, and the magic of Open Source Growth, subscribe to our newsletter.

Top comments (17)

Collapse
 
srbhr profile image
Saurabh Rai • Edited

Thanks a lot, Nevo, for providing me with this opportunity to create the Alien Hunter Saga.
I'm available on GitHub at srbhr
For those who want to connect and follow me 💖🌺.
I'm working on many open-source stuff and would love the community's support.

Follow me on GitHub

Collapse
 
nathan_tarbert profile image
Nathan Tarbert • Edited

This is a playbook for governments around the world to take notice and start teaching COBOL in all schools, in hopes of building an army of developers for future conflicts.

Thank you XAE-12 for your contributions to fighting the alien forces, and mastering COBOL. I hope to see a tutorial in the next series!

Collapse
 
srbhr profile image
Saurabh Rai

Yes, let's join the resistance and save the world!!

Collapse
 
juanlanus profile image
Juan Lanus

The single thing that makes COBOL code look ancient is writing it in all uppercase.
Using lowercases makes it more similar to modern code.
Uppercases were a must with line printers (like IBM 1403) that had a 48-characters repertoire, that is, no lowercase types.

Collapse
 
srbhr profile image
Saurabh Rai

Ha ha yeah, but we've got SQL as well.

Collapse
 
juanlanus profile image
Juan Lanus

SQL looks great using lowercase too.
Actually, I've found that in SQL the best for me was to uppercase only the keywords. In SQL indenting is crucial to understand lengthy procedures.
In my work with usability I learned that for us humans (IT guys included) reading an all-caps text is painfull, compared with the usual mixed case seen around.
This is because we recognize the words by looking at their upper edge.
When this edge is as straight as uppercase text's, then we need to look twice in order to confirm our first glance outcome.
Thus, we read slower and with more effort.

BWT, very good article!

Thread Thread
 
srbhr profile image
Saurabh Rai

Thanks for your good works @juanlanus. And yes.

This is because we recognize the words by looking at their upper edge.
When this edge is as straight as uppercase text's, then we need to look twice in order to confirm our first glance outcome.

this makes reading capital letters a bit tedious. By we gotta do what we gotta do.

Collapse
 
garrrikkotua profile image
Igor Kotua

We need useCOBOL hook in React immediately

Nice article, @srbhr !

Collapse
 
srbhr profile image
Saurabh Rai

Yes, why stop at React, we've got huge mainframes to write and fix. NextJS (COBOL version).

Collapse
 
nevodavid profile image
Nevo David

Thank you COBOL!

Collapse
 
srbhr profile image
Saurabh Rai

Ha ha yeah! COBOL for the win!

Collapse
 
fernandezbaptiste profile image
Bap

lol, really liked it!

Collapse
 
srbhr profile image
Saurabh Rai

Thank you!!

Collapse
 
shreya_gr profile image
Shreya

thanks for sharing details for COBOL!

Collapse
 
srbhr profile image
Saurabh Rai

When will Firecamp support COBOL??

Collapse
 
fast profile image
fast-d3v

LOL, is this a meme or what?
But I like it! 😂

Collapse
 
srbhr profile image
Saurabh Rai

It is for fun and laughs. But COBOL is king.