Slashdot Mirror


COBOL Will Outlive Us All

jfruh writes "Here's an old computer science joke: What's the difference between hardware and software? If you use hardware long enough, it breaks. If you use software long enough, it works. The truth behind that is the reason that so much decades-old COBOL code is out there still driving crucial applications at banks and other huge companies. Many attempts to replace COBOL applications flopped in the 1980s and '90s, and we're stuck with them for the foreseeable future — but the Baby Boomers who wrote all that code are now retiring en masse."

19 of 318 comments (clear)

  1. Batch by mwvdlee · · Score: 5, Informative

    Well... that and the fact that COBOL is actually very good at what it was made to do; batch file processing.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    1. Re:Batch by grh_angelone · · Score: 5, Funny

      I hate it. Stupidest language of all time. I'm trying to convert all these crap programs to nicely done RPG IV, but its a Don Quijote task. I hate the fact, that file access can only be done in 50 lines of code. String operations are total nonsense, ever tried to get a string rightaligned? RPG file access via chain is done in 5-6 lines including the definition of the file and rightalign via evalr().

    2. Re:Batch by jellomizer · · Score: 5, Insightful

      No, the language doesn't matter. It is the fact that the COBOL code is old. When it was popular it was common for organizations to write their own software. This custom written software was molded to fit the companies processes and workflow. Then you add decades of alterations and the software gets very complex, however it nearly covers the full operation.

      So now if you are going to replace it, right now it is popular to get these "enterprise" solutions that are so generic that it takes more work to configure it than it does to make new software or port the code in a new language.

      As well most organizations just don't know why they need to upgrade they just think they do, and after the upgrade they want a program to do exactly what the last one did.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:Batch by grh_angelone · · Score: 5, Informative

      ok, this doesn't bring us any further, but do you really think, that moving something in a right justified variable is the solution?

      this doesn't only need another variable, but if your source value has trailing spaces you will need a ridiculously long INSPECT line and an index variable for a substring.
      since cobol is dumb, you will further need an INITIALIZE for both variables.

      cobol:
      01 var1 PIC X(50)
      01 var2 PIC X(50) justified right
      01 sub PIC 9(2)
      initialize var1 var2 sub
      move "test " to var1
      initialize var1 tallying sub for trailing space
      if sub = 0
      move var1 to var2
      else
      move var1(1:sub) to var2
      end-if

      rpg:
      d var1 s 50a
      d var2 s 50a
      c eval var1='test '
      c evalr var2=%trim(var1)

      seems way more convinient :)
      even tough RPG is ill-reputed as an old static programming language this looks somehow like any other high level language and anyone should understand what's going on here without trying to figure out what that strange INSPECT does

    4. Re:Batch by Anonymous Coward · · Score: 5, Informative

      No. COBOL was designed for taking simple decimal (BCD) representations of quantities and financial amounts, conducting basic arithmetic operations on those and transferring the result back to storage or line-printer-style reports.

      It is still the basis of a great many online, interactive applications as a result of the development of OLTP systems that were intended to provide "real time" transactions on top of old legacy batch procedures. CICS in particular is alive and well and nothing to do with batch processing - though its interactivity is largely achieved by having the display terminal emulate the fixed fields of punched cards and line printer columns - and although it has support for several languages, COBOL is where it found its natural home.

      There's nothing magical or mysterious about COBOL (apart, perhaps, from the MOVE CORRESPONDING statement) - it's a procedural programming language that works with simple representations of data. The idea that a modern generation of programmers can't understand it is ludicrous and anyone that suggests rewriting swathes of code simply to change the syntax of its representation doesn't understand the first principles of software engineering.

      COBOL is here to stay in both batch and interactive applications.

    5. Re:Batch by peragrin · · Score: 5, Insightful

      That because the cost of retraining people in new workflows is generally higher than the software package to begin with.

      If you gut and replace software you have to modify every employee's workflow to compensate. EVERY person has to do their job slightly differently, and no one has the answers as to how it all has to be worked out from the beginning for each part.

      That takes months in a small 20 person organization that is flexible and adaptable. It can take years of lost productivity for larger ones.

      I am doing it right now. We are gutting our old ERP system to use a much simplier but ultimately more useful ERP system. Everything from sales, accounting, purchasing, warehousing, inventory, delivery drivers, all have to change how they process their paperwork. We basically had the office staff doing 2 days of nothing as we sorted out bugs with the initial data transfer. Now that is done we begin the task of sorting out workflows, new SOPs, etc.

      --
      i thought once I was found, but it was only a dream.
    6. Re:Batch by johnnyb · · Score: 5, Funny

      The real problem with COBOL is that, as Larry Wall has pointed out, you can't write poetry with it. There just isn't any good poetry that starts out with IDENTIFICATION SECTION.

      The one thing I do miss about COBOL is easy access to fixed-point numeric processing. This seems like a no-brainer, but it is still missing from nearly every language.

    7. Re:Batch by VortexCortex · · Score: 5, Funny

      There once was an IDENTIFICATION SECTION
      Preceding a formula that defied all reflection.
      Using all the chem-lab's powers,
      it ran longer than four hours,
      To make pills that promoted erection!

    8. Re:Batch by mabhatter654 · · Score: 5, Funny

      RPG vs COBOL!!!

      Fight! Fight!
      Canes and walkers allowed... No punching the kolostamy bag.

    9. Re:Batch by bws111 · · Score: 5, Informative

      Um, no. I don't know where you got that crap, but it is entirely false. IBM itself currently sells COBOL, FORTRAN, C/C++, PL/1, and REXX compilers for z/OS. In addition, you can use gcc, etc.

      And your line about IBM mainframes not having protected memory is complete bullshit. They have had protected memory since 1964. It is not an option.

      And NO user space programs affect system integrity, no matter how they are written or what language they are written in. That is one of the major selling points of z/OS.

    10. Re:Batch by frank_adrian314159 · · Score: 5, Insightful

      ... the following languages all support an accurate decimal data type in the standard libraries: Python, Ruby, Java, and Objective-C.

      Which is not the same as supporting it in the language itself, either from a convenience nor a performance point of view.

      --
      That is all.
    11. Re:Batch by Sique · · Score: 5, Informative

      When COBOL was being used for new development, I don't think the P1 was even out, we're on Xeons now.

      When COBOL was being used for new development, the microprocessor wasn't even invented yet, and Intel founder Robert Noyce was working at Fairchild Semiconductor and had his first integreted circuit ready.

      --
      .sig: Sique *sigh*
  2. If a technology is outdated, outsource it. by ixarux · · Score: 5, Interesting

    Yup. I was hired into one of those mainframe companies that worked with COBOL and JCL. The work was the most menial of works I had ever done(after they trained me for 6 months in it).
    The financial sector, the lumbering dinosaur that accepts change only when they have no other option, and the ones maintaining decades-old mainframes really have no incentive to change technologies at the moment. It's easier to just outsource the maintenance and servicing of the mainframes. There are enough of coders (like in the company I joined) in developing countries across the world who would gladly take it up.
    From my experience, there is little development happening any more. I think the day when they run out of people who want to this crappy menial job (which is never) is the day COBOL will go extinct.

    1. Re:If a technology is outdated, outsource it. by jandersen · · Score: 5, Interesting

      So, you didn't like to work on a mainframe, then?

      But don't slag off the mainframe just because it is 'old' technology - the PC architecture isn't all that young either, and the mainframe, believe it or not, is in fact very VERY much on the technological forefront, hardware wise. Mainframes had fiber attached disks before most modern developers had heard of networking.

      Big to huge institutions don't use mainframes because they are too backwards thinking, but because of reliability. In an industry where downtime costs millions to tens of millions per minute, that counts a lot. On a mainfram you can hot-swap just about everything - not just disks, but everything. And if you wish, you can run Linux on it as well; but it is amazing how often the choice is MVS and COBOL; that is because they are just what you need - not multitools like UNIX and C, just a plain old knife meant for cutting only.

  3. Lords of COBOL by ae1294 · · Score: 5, Funny

    All of this has happened before and will happen again...

  4. Every 3 to 5 years. by sgrover · · Score: 5, Insightful

    Every 3 to 5 years this topic comes up. It's almost like some new batch of CompSci graduates start to evaluate the state of the industry, and share their "discoveries" with the world. Except it is the same old discoveries couched in modern terms.

    1. Re:Every 3 to 5 years. by mvdwege · · Score: 5, Insightful

      That's because IT is suffused with a teenage culture that equates 'old' with 'useless'.

      Being able to spew the buzzwords related to the newest fad seems to be a requirement for a dev job these days.

      It doesn't help that the industry as a whole (especially in the US) seems to prey on young naive workers and likes to keep them that way in order to extract the maximum profit out of them.

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
  5. COBOL is a work of genius by sirwired · · Score: 5, Insightful

    Viewed through the eyes of a modern programmer, COBOL is indeed a joke. A horrible one. It violates nearly every single principle of good language design in what appears to be a misguided attempt to make programming "friendly." A CS undergrad would get a poor grade turning in something like COBOL as a Programming Languages 101 project.

    But for a language first specified in 1959 (when computing didn't even have the Integrated Circuit yet), it's a work of staggering genius; they didn't HAVE all those rules of good language design to fall back on! At the time, FORTRAN had been out for all of two years and LISP for one; hardly enough time to have much experience with knowing what not to do, and neither of those languages targeted the same problem domain.

    COBOL made modern computing accessible and useful to businesses. It's programs have maintained decent backwards compatibility for about half a century. And for all it's foibles, all those hundreds of millions of lines of COBOL actually work. They may be a disgusting kludge, a result of decades of compromises, but these gigantic black boxes of spaghetti Work. And there's no reason to think they'll stop doing so any time soon. Nor any reason to believe that replacing them would be in any way cost-effective.

  6. Hire veteran COBOLers, retirements won't matter. by emes · · Score: 5, Insightful

    It is a bromide perpetrated by ITAA and business groups that we can't find enough programmers to replace the ones who are retiring.

    The simple truth is that no one wants to PAY what people are worth, and there is rampant age discrimination:

    http://www.itbusinessedge.com/cm/blogs/tennant/yes-age-discrimination-is-worse-in-it-than-in-other-fields/?cs=38549

    Be willing to hire, retrain, or do whatever it takes to employ people over 35 and this so-called problem will be
    shown to be the chimera that it really is.