Java and Cobol differences

10,038

Solution 1

Similarities

  1. Cobol and Java were going to change the world and solve the problem of programming.

  2. Neither lived up to the initial hype.

  3. There are now very large, bloated Cobol and Java programs that are used by banks and are "legacy" ... too large and critical to rewrite or throw away.

  4. Cobol introduce the idea of having long, readable names in their code. Java recommends long, readable names.

Differences

  1. Cobol was invented by an American, Grace Murray Hopper, who received the highest award by the Department of Defense, the Defense Distinguished Service Medal.

  2. Java was invented by a Canadian, James Gosling, who received Canada's highest civilian honor, an Officer of the Order of Canada.

3 COBOL convention uses a "-" to separate words in names, Java convention uses upper/lower CamelCase.

Solution 2

COBOL was popular for the simple reason, to develop business applications.

Since the syntax was so clear and human-like, written in procedural style, it was for that reason, that made adapting to the changes in the business environment much easier, for example, to assign a value of pi to a variable, and then subtract zero from it - simple example to show the actual COBOL statements/sentences (it is years since I last programmed in Cobol)

MOVE 3.14 INTO VARPI.
SUBTRACT ZERO FROM VARPI GIVING VARPIRESULT.
IF VARPIRESULT AND ZERO EQUALS VARPI THEN DISPLAY 'Ok'.

If I remember, the COBOL sentences have to be at column 30...

And it is that, hence easier to troubleshoot because any potential business logic error can be easily pin-pointed as a result. Not alone that, since COBOL ran on mainframe systems, it was for a reason, the data transfer from files were shifted at a speed that is light-years ahead of the other systems such as PC's and that is another reason why data processing in COBOL was blindingly fast.

I have worked on the Y2k stuff on the mainframe (IBM MVS/360) and it was incredible at the dawn of the 21st century, praying that the fixes I put in wouldn't bring the business applications to their knees...that was hype, aside from that..to this day, it is still used because of the serious transfer speed of data shuffling around within mainframes and ease of maintainability.

I know for starters, Java would not just be able to do that, has Java got a port available for these mainframes (IBM MVS/360, 390, AS400)?

Now, businesses cannot afford to dump COBOL as they would effectively be 'committing suicide' as that is where their business applications resides on, which is the reason why the upgrade, migration, porting to a different language is too expensive and would cause a serious headache in the world of businesses today...

Not alone that, imagine having to rewrite procedural code which are legacy code and could contain vital business logic, to take advantage of the OOP style of Java, the end result would be 'lost in translation' and requiring a lot of patience, stress and pressure.

Imagine, a healthcare system (I have worked for one, which ran on the system I mentioned above), was to ditch all their claims processing,billing etc (written in COBOL) to Java, along with the potential for glitches and not to mention, serious $$$ amount of money to invest which would cost the healthcare company itself far more, the end result would be chaos and loss of money, and customers (corporations that offer employee benefits) would end up dumping the company for a better one.

So to answer your question, I hope I have illustrated the differences - to summarize:

COBOL is:

  • Procedural language
  • Simple human like syntax
  • very fast on mainframe systems
  • Easy to maintain code due to syntax

In contrast,

Java is:

  • Object Oriented
  • Syntax can get complicated
  • Requires a Java Virtual Machine to run and execute the compiled bytecode.

Hope this helps,

Solution 3

Similarities:

  1. Both extremely verbose and created with pointy-haired bosses, not programmers, in mind.
  2. Both used primarily for boring business software.
  3. Both have huge legacy and are going to be around a while.

Solution 4

It is easier to point out what they have in common instead of listing their differences.

So here is the list:

  1. You can use both to make the computer do things
  2. They both get compiled to yet a different language (machine code, byte-code)
  3. That is it!
Share:
10,038
user246584
Author by

user246584

Updated on June 15, 2022

Comments

  • user246584
    user246584 almost 2 years

    Can anyone help comparing and contrasting between Java and cobol in terms of technical differences as well as architectural design styles