back to article Cloudflare goes retro with COBOL delivery service. Older coders: Who's laughing now? Turns out we're still vital

Network infrastructure biz Cloudflare has implemented a way to run COBOL code on its serverless platform Cloudflare Workers. COBOL, 60 years old this month if you start at the publication of the US Defense Department's April 1960 software specification, is short for COmmon Business Oriented Language. Work on the programming …

  1. COBOLer

    I was a COBOL programmer for many years. Any decent programmer can learn COBOL in a day or two, as long as they understand that computer languages don't all look like C and they don't mind doing a lot of typing.

    1. HildyJ Silver badge
      Holmes

      Mindset

      Programmers who try pick up COBOL can understand the grammar relatively easily. In my last job I was managing contractors who were doing COBOL programming and for those who were coming from a C like background I felt the biggest problem was that COBOL requires a different mindset. For example, you can't declare variables on the fly in COBOL. Even "Hello World" takes planning. It feels cumbersome to them.

      The biggest problem in COBOL maintenance is not the lack of programmers it is the lack of up to date documentation and even source code. COBOL can create such bulletproof programs that they can run for decades but all the "we need this now" changes (like Y2K) don't get documented. Moreover, the original documentation may be typed out and filed somewhere, subject to all the slings and arrows of outrageous fortune that paper is heir to.

      1. Anonymous Coward
        Facepalm

        Re: Mindset

        If you actually wanted to write 'Hello World" in COBOL, you deserve to be shot, then drawn and quartered.

        Sorry but that's like using a hammer when you need a screw driver.

        1. Allan George Dyer
          Facepalm

          Re: Mindset

          I think you've missed the point of "Hello World".

          If there's any point in drawing and quartering after shooting, your firing squad needs urgent training.

          1. Saruman the White

            Re: Mindset

            When I was a research student (several decades ago) I used to take tutorials on COBOL for under- and post-grads. I loved to start the first tutorial comparing a C "Hello World" to a COBOL one. Made people realise that you actually had to think to be a COBOL programmer.

            Oh yes - the reason why I took those tutorials? I was the only other person in the Comp Sci dept (apart from the lecturer in charge of the COBOL course) who had any sort of practical experience in COBOL. Or at least, the only one who admitted to it :-)

          2. Anonymous Coward
            Anonymous Coward

            Re: If there's any point in drawing and quartering after shooting,

            Mostly I do it to terrify the population some more. I find that a grotesque display of excessive brutality and on-display corpse mangling does much to add to the general fearsomeness of my regime.

            Well, it's either that or show them a "Hello World" programme in COBOL :-)

            1. Anonymous Coward
              Thumb Up

              Re: If there's any point in drawing and quartering after shooting,

              You’ve even used the COBOL-approved spelling of “program”.

              1. Anonymous Coward
                Anonymous Coward

                Re: If there's any point in drawing and quartering after shooting,

                The English spelling then?

          3. Teiwaz Silver badge

            Re: Mindset

            If there's any point in drawing and quartering after shooting, your firing squad needs urgent training.

            Not necessarily, remember, they dug up Cromwell in order to execute him for treason.

            1. Allan George Dyer
              Joke

              Re: Mindset

              @Telwaz - "they dug up Cromwell in order to execute him for treason"

              Admit it, you copied that phrase from the dictionary definition of "futile exercise".

              1. Wellyboot Silver badge

                Re: Mindset

                It had a purpose, "Don't think merely being dead and buried will stop us coming for you"

                1. Sgt_Oddball Silver badge
                  Flame

                  Re: Mindset

                  Yes indeed, just look at what they did to Saville's concrete grave...

                2. Roland6 Silver badge

                  Re: Mindset

                  Oak stakes (through the heart) seem to have a better reputation for keeping the dead and buried, dead and buried.

              2. aks

                Re: Mindset

                It's necessary to exhume the body to be able to cut off the head and put it on a pole outside Westminster Hall for the next 14 years.

                https://en.wikipedia.org/wiki/Oliver_Cromwell#Death_and_posthumous_execution

                Still my hero.

            2. Anonymous Coward
              Boffin

              Re: Mindset

              If there's any point in drawing and quartering after shooting, your firing squad needs urgent training.

              Not necessarily, remember, they dug up Cromwell in order to execute him for treason.

              -=-

              Geez I guess a bit of history lesson as well as the obvious redundancy should be in order.

              There are a few cases where you have redundant methods of death performed. Primarily as a way to desecrate the corpse. Or to send a signal that you really wanted the person dead.

              Remind me how William Wallace was killed?

              [Hint: He was hanged, drawn and quartered—strangled by hanging, but released while he was still alive, emasculated, eviscerated and his bowels burned before him, beheaded, then cut into four parts.]

              Just to save you from going to Wikipedia.

              1. aqk
                IT Angle

                Re: It's all in the execution.

                Well, it's nice to know that Admiral Grace Hopper died a peaceful and civilised death.

          4. Anonymous Coward
            Boffin

            Re: Mindset

            No, I didn't.

            But then again I seriously doubt you've done anything w COBOL and CopyBooks either.

            Its sort of like a C developer mocking Objective-C/NextStep for how large the executable was for a simple 'Hello World' when the C compiled code was so much smaller.

            Yeah, I'm that old that I know COBOL, FORTRAN, Revelation (Pick), C, and a slew of other languages where I can appreciate them all.

          5. short a sandwich

            Re: Mindset

            BOFH SOP surely. Shock and awe to cow the PHB art al.

        2. Anonymous Coward
          Big Brother

          Re: Mindset

          When I was 19 I was a mainframe console operator. I wrote a program in COBOL to play blackjack interactively on the system console.

          It helped pass the time during those late night IMS batch updates.

          Connecticut Labor Commissioner Kurt Westby on Wednesday recounted the "hundreds of hours of programming" that have gone into modifying his state's unemployment claims system, which runs on 40-year-old hardware
          I don't think IBM still supports the 3032 Processor Complex.

          1. Joe W Silver badge

            Re: Mindset

            They probably mean the architecture, I guess. Our shop is running an early 70s architecture. Ah. Well.

          2. Gene Cash Silver badge

            Re: Mindset

            > I don't think IBM still supports the 3032 Processor Complex.

            Hell yeah they would, if you paid 'em enough money!

          3. Version 1.0 Silver badge

            Re: Mindset

            In the early 90's the local Hillsborough community college in Tampa had been given an old PerkinElmer computer that they wanted to use to teach the students basic programming. It had been donated with all the manual and a copy of COBOL installed, so I wrote them a cross-compiler in COBOL to get them going.

            It worked fine, I think it took about a day to write it - it was fun doing it, I still laugh about it today.

        3. red19

          Re: Mindset

          "Sorry but that's like using a hammer when you need a screw driver."

          That's just a Birmingham screwdriver

          1. Admiral Grace Hopper Silver badge

            Re: Mindset

            "That's just a Birmingham screwdriver"

            Unless you're from Birmingham, in which case it's a West Bromwich screwdriver.

            1. Antron Argaiv Silver badge
              Happy

              Re: Mindset

              User name checks out...

            2. Anonymous Coward
              Trollface

              Re: Mindset

              So what do people in West Bromwich say?

        4. bombastic bob Silver badge
          Devil

          Re: Mindset

          hey there are some pretty good 'hello world' examples here:

          https://sample-programs.therenegadecoder.com/projects/hello-world/

          it didn't have COBOL though..

          however a quicky search gave me this, which (from my decaying memory on COBOL) seems about right:

          IDENTIFICATION DIVISION.

          PROGRAM-ID. HELLOWRD.

          PROCEDURE DIVISION.

          DISPLAY "HELLO WORLD".

          STOP RUN.

          yeah you don't need any 88's or data divisions or anything like it, do ya?

          1. Michael Wojcik Silver badge

            Re: Mindset

            Standard COBOL (ISO/IEC 1989-1986 et seq) lets you omit IDENTIFICATION DIVISION. Some dialects let you omit the PROGRAM-ID as well. Assuming this is the initial program you don't need STOP RUN. The period on the DISPLAY statement is unnecessary (and in fact undesirable) with the STOP RUN, but I'd keep it and get rid of the latter. In most environments you don't need to use uppercase, which arguably makes things more readable.

            So:

            program-id. hellowrd.

            procedure division.

            display "Hello World".

            Three lines. (Note this is free-format; the Reg doesn't support formatting code properly in comments.)

            1. Anonymous Coward
              Facepalm

              @Michael Wojcik Re: Mindset

              And what does this teach you about COBOL?

              Now look at the C example for Hello World.

              What does that teach you?

              Now you start to see why it doesn't make sense in COBOL.

      2. sillyoldme

        Re: Mindset

        I remember getting roped in to reviewing about a gazillion lines of code at a client back in Y2K (McGraw-Hill). That was painful - because they had zero documentation (ironic, no?)

        As a result of that experience, I got the opportunity to spec the rewrite of the subscription management system for one of their divisions (not the whole shebang). Initially in COBOL, it was almost immediately migrated it to a whiz-bang new local office server (PC based, if I recall) using a local install of SQL Server with a VB front end (yes - to my shame...I used VB) because the system had a grand total of three users... all in the same office, two of whom shared the same desk, and one of whom was 'the boss' who only ever touched the system as a matter of last resort. The non COBOL version had a 3 month ROI including hardware versus 5 years for the COBOL version (which required a particular server to remain active)

        It sticks in my mind, because for about six or seven years I would get the occasional call - from the boss - because the staff were on vacation and she had to 'run the subs report' (everything else was pretty much automated up the wazoo). Never got paid for any of those 'support calls'.

        1. A.P. Veening Silver badge

          Re: Mindset

          At the third call you should have reminded that boss about the outstanding payments with a clear warning you wouldn't help a fourth time before those outstanding payment were indeed payed.

      3. Warm Braw Silver badge

        Re: Mindset

        "Hello World" takes planning

        An additional problem these days is that you need to convince the police that it is genuinely necessary for you to make a trip to the data centre to drop off your cards and to return the following day to collect the outsize sheets of perforated paper. Perhaps you could claim it was outsize toilet roll.

        1. Anonymous Coward
          Anonymous Coward

          Re: Mindset

          I wrote COBOL many years ago and found it to be OK. Not my preferred language but it has a lot of strong points.

          Pretty much any language has got weak points and I've had Java code for which the documentation is missing, has become convoluted and/or the source is lost (can be reverse engineered but not very easy to work on).

          Same story with JavaScript, especially if you have some which has gone through a compacting process which in effect obfuscates it.

          Sadly, instead of realising that documentation and source control are key, many managers prefer to call it legacy and insist whatever is currently fashionable will "fix" the problem.

          1. Doctor Syntax Silver badge

            Re: Mindset

            "many managers prefer to call it legacy"

            Oddly enough, very few of them would spurn the legacy if their old aunt left them her house and a few [£$]k in her will. It's a funny old world.

            1. Mike 16 Silver badge

              Re: Legacy

              What if Auntie's house came with a few Shoggoths in the cellar?

          2. Martin Gregorie Silver badge

            Re: Mindset

            I've had Java code for which the documentation is missing

            There's absolutely no excuse for this given that the javadoc tool is part of the standard development package.

            If the project is using waterfall development, the people writing module specs really should be formatting them as a Java skeleton (class-level comment and header followed by method-level comments and empty methods - this way the documentation is part of the source from the off.

            For other development methods, code reviews should automatically be failed if class and method level comments are missing or cause javadoc to report errors and/or warnings.

            I think any programming language, apart from assemblers or COBOL that doesn't have an equivalent tool is severely deficient - they're not hard to write: I wrote one for C that generates documentation after the style of 'The C Programming language' by K&R and use it for documenting private library functions.

        2. Wellyboot Silver badge

          Re: Mindset

          >>> "Hello World" takes planning <<<

          That was the point, detailed planning to produce robust code that played nice on the low memory capacity batch mainframes of the day* and was a real benefit in debugging - 'Time = Money'

          By the time you've defined every variable properly according to how it will be used there will be a very good understanding amongst the programming team as to what the spec is aiming to do, before they start cranking out any code.

          * and still plays nice on current hardware.

          1. A.P. Veening Silver badge

            Re: Mindset

            * and still plays nice on current hardware.

            If by playing nice you mean outperforming "modern" software with the same function by a factor of at least ten, I agree.

      4. John Brown (no body) Silver badge

        Re: Mindset

        "Even "Hello World" takes planning. It feels cumbersome to them."

        And this is probably one of the primary reasons that so many old COBOL programs are still running decades later with little to no maintenance. COBOL pretty much forces you to write clear and structured programs that, source code availability permitting, is pretty easy to understand years later.

      5. COBOLer

        Re: Mindset

        I also did plenty of assembler-language programming. You need the same mindset: every variable must be declared with an explicit size. I always thought every software developer had that mindset.

    2. Anonymous Coward
      Anonymous Coward

      Fun with COBOL

      We had a COBOL course in our degree (graduation year 1985) because it got us exemption from having to do another exam for BCS membership, or something like that. The keen group sat at the back of the class trying to come up with extensions to the language which we thought would be on the borderline of plausibility; "PROCEED CAUTIOUSLY" and "PROCEED CONFIDENTLY" for turning run-time checking on and off, for example. And some less plausible, such as "GOTO A VIA B" which would execute one statement at B before jumping to A.

      We had to do a sample exercise in it, too: a simple payroll program, of course. Not much of a challenge, so I set myself an extension to the exercise: write the equivalent program in the scripted editor language on that system, which was at roughly the same level as "sed": no variables, no comparisons, no numeric facilities, so I had to do it almost Turing-machine style. It was still shorter than the COBOL program.

      1. Michael Wojcik Silver badge

        Re: Fun with COBOL

        as "GOTO A VIA B" which would execute one statement at B before jumping to A.

        Considering COBOL does have PERFORM THROUGH (or THRU), which will happily accept a second paragraph-name that appears before the first paragraph-name, this wouldn't be that much of a stretch.

        (PERFORM A THROUGH B says "start at paragraph A, and if you ever reach the end of paragraph B, come back here". Usually COBOL programmers will perform a contiguous range of paragraphs in the order they appear in the source, but you're not required to. There can be any arbitrary morass of GOTOs among those paragraphs and any others you have in the program. And some implementations have stacked performs, but others use flat performs, and that quickly becomes quite confusing.)

        1. Ken Shabby
          Linux

          Re: Fun with COBOL

          I was al right with it until i found is lacked a

          COME FROM or COMEFROM

          Statement

  2. Admiral Grace Hopper Silver badge
    Thumb Up

    Excellent news

    Message ends.

  3. James Anderson Silver badge

    “Old Hardware” is fake news

    The current line of Zseries mainframes is the most advanced server hardware available, and, you pay a substantial premium to get it.

    One of the reasons there is still so much COBOL still running is the continuous development of the 360 hardware. A three year refresh cycle that has been sustained for 50 years.

    This combined with a zealous commitment to backward compatibility means that the sensible choice has always been upgrade the hardware and maintain the old code, rather than risk a rewrite.

    Not to mention the sad history and high failure rate of “let’s move this of the mainframe” to minicomputers, clusters, unix windows and currently “the cloud” projects.

    So what we have is lots of 40 to 20 year old systems running on slick hardware, some of which has been well maintained and most of which has been running for years with few changes.

    1. Joe W Silver badge

      Re: “Old Hardware” is fake news

      Yup. My thoughts exactly. The throughput achieved by these systems is amazing...

    2. MarkET

      Re: “Old Hardware” is fake news

      If you look at the amount of physical boxes in a typical machine room, not to mention VMs, the low-end Z series machines look a good ROI.

    3. yoganmahew

      Re: “Old Hardware” is fake news

      Indeed, the sixty year old code I update (extend) and maintain is flying. Well, would be flying if anyone was, er, flying. The z-series is a fabulous piece of kit. That IBM keep expanding the hardware capabilities tells you the demand there still is for it.

      1. James Anderson Silver badge

        Re: “Old Hardware” is fake news

        The big problem with migrating COBOL off the mainframe is not the language itself which is reasonably portable, if you are prepared to accept the minor differences between compilers.

        However most COBOL is dependent on the unique and complex mainframe environment. CICS or IMS/TM, plus DB2, VSAM IMS/DB IMS/Fastpath not to mention the horrors of JCL.

        Not only does it need an almost complete rewrite to move the code into a *nixy or wndows environment, but while the above software environment may be old fashioned and sometime awkward it performs and scales like nothing else.

        Compare the resources taken by say a CICS/DB2/COBOL based system with a J2EE/Java system doing the same job -- the java will consume about 5 times the resource for half the performance.

        (P.S. as zOS hosts a 100% complaint J2EE, Java environment you can do like for like tests on the same hardware).

        1. MarkET

          Re: “Old Hardware” is fake news

          Z series hardware runs Java on "Application Assist" co-processors

        2. Admiral Grace Hopper Silver badge

          Re: “Old Hardware” is fake news

          "However most COBOL is dependent on the unique and complex mainframe environment."

          That's why ICL (then Fujitsu, after they bought them, but the people were largely the same) made sure that the emulated versions of VME running on Linux look to the code exactly like a VME box soldered together in Manchester in 1974.

        3. Michael Wojcik Silver badge

          Re: “Old Hardware” is fake news

          Not only does it need an almost complete rewrite to move the code into a *nixy or wndows environment

          Or you migrate it to a Windows, Linux, or UNIX COBOL implementation that includes CICS / JCL / IMS emulation.

        4. Roland6 Silver badge

          Re: “Old Hardware” is fake news

          >The big problem with migrating COBOL off the mainframe is not the language itself which is reasonably portable...

          From a project I did pre-2000, another gotcha was that whilst the Unix system could provide a reasonable emulation of the mainframe runtime environment so could handle compiled code, it was another matter with the development tools. Resulting in a mainframe having to be kept...

  4. Ken Moorhouse Silver badge

    Michael Jackson

    I've got a hardback copy of his book on structured programming knocking around somewhere.

    I didn't ever use COBOL, but was interested in moving beyond spaghetti coding (Coral 66).

    1. Roger Greenwood
      Thumb Up

      Re: Michael Jackson

      Wow that's a blast from the past Ken. I went back to school 25 years ago and had to do a bit of JSP. That's also when I learnt the far more valuable JFDI...

      1. Anonymous Coward
        Anonymous Coward

        Re: Michael Jackson

        If the old mainframe programmers had relied on JFDI rather than JSP, Y2K would have been a complete fustercluck rather than a whimper.

  5. LDS Silver badge

    "you can compile COBOL code to C and then use Emscripten to compile..."

    IT looks more and more like a Goldberg contraption...

    1. Mike 16 Silver badge

      Re: IT looks more and more like a Goldberg contraption...

      _Way_ too few moving pieces (if you don't look too hard within GNUCobol or Emscripten).

      Anyway, don't you mean Heath Robinson? Glance up to the URL bar (if you still have one) and note the .co.uk

    2. Mike Pellatt
      Coat

      Re: "you can compile COBOL code to C and then use Emscripten to compile..."

      Back in the day, when emulators first became A Thing, there was a saying.

      "Emulation's like masturbation. Do it often enough, and you forget what the real thing's like"

      1. This post has been deleted by a moderator

  6. anonymous boring coward Silver badge

    Quite a few times I have wished I was old enough to be a COBOL programmer.

    Y2K preparations was one time, for example.

    I guess my C experience will never amount to much.

    You had to go and invent C++, C# and, worst of all, Python, didn't you? Ah, damn you! God damn you all to hell!

    1. bombastic bob Silver badge
      Devil

      C++ and Python are ok; C-pound, however... ABOMINATION!

      1. Anonymous Coward
        Anonymous Coward

        You mean C-octothorpe?

        1. Nick Ryan Silver badge

          Nope, wrong character. Definitely C-hash. Which originally described it rather well, although to be fair it's matured a bit since although some of the language additions make me want to gouge my eyeballs out attempting to work out how the principle of being easy read and therefore less easy to make mistakes got fired into the sun at some point.

          1. Claptrap314 Silver badge

            Maybe a decade ago, I was talking to a programmer, who mentioned that, besides AD, C# was the one thing that u$ got right. A year ago, I found myself directed to work in it. My opinion of that programmer has been suitably adjusted.

        2. Mike Pellatt
  7. clyde666

    Retrieve the old textbooks

    One of the things on my To Do list during this lockdown, is clear out old (very old) storage.

    Like my old course textbooks, notes, etc.

    Maybe I should accelerate that and put the books up on Ebay.

    With punched cards.

    1. Gene Cash Silver badge

      Re: Retrieve the old textbooks

      Nope. I don't toss my old textbooks, the margin notes and such are a great taxi down memory lane.

      Plus I still have a pack of punchcards with my university logo on them. They were sold in the vending machine in the computer lab, so you could get them when you needed them at 2am.

      1. John Brown (no body) Silver badge

        Re: Retrieve the old textbooks

        Sold? Wow! We just and went got what we needed. No questions, no charge.

        Were you at university in the US?

    2. Ken Moorhouse Silver badge

      Re: Retrieve the old textbooks

      I have some very interesting (if you're into that sort of thing) books which I don't think I can bear to part with. How about this one (my copy looks to be in better condition lol):-

      http://www.computinghistory.org.uk/det/55997/How-A-Computer-Works-(Second-Edition)/

      Very readable despite being produced using a typewriter and Gestetner.

      1. Nick Ryan Silver badge

        Re: Retrieve the old textbooks

        I don't have anything that old, but I have kept hold of some old computer magazines from the lates 1970s and early 1980s. I'm think a few were PCW (Personal Computer World) but others were more business oriented. Quite an interesting read just for the adverts alone but also the articles complaining about the same old problems!

      2. Philip Lewis

        Re: Retrieve the old textbooks

        +1 for Gestetner, a word I haven't seen used since I was a sprog.

      3. earl grey
        Pint

        Re: Retrieve the old textbooks

        Upvote for the Gestetner. I used to have to run one of those many decades ago and it was a fine machine.

    3. Antron Argaiv Silver badge

      Re: Retrieve the old textbooks

      There's still time to make a Christmas wreath out of those punched cards. All you need is a cardboard backing, a stapler and a can of gold spray paint. Pine cones, Christmas baubles and glitter optional for the centre.

      https://aadl.org/N021_0795_002

      1. Anonymous Coward
        Anonymous Coward

        Re: Christmas wreath out of those punched cards

        No, do something useful like make a nightstand out of it. My nightstand is as old as some of these COBOL programs and it is still doing fine.

  8. Anonymous Coward
    Anonymous Coward

    academics

    "It was also disparaged by some computer scientists for its lack of academic pedigree."

    Yep, like any language less weird than Lisp and Prolog. Seriously, I've seen serious stuff in Lisp, but Prolog ??? WTF ?

    Good to see Cobol can live on, but the issue is, the more you keep those things living, the less chances you have to even remember what it does and why.

    Also, on legacy systems, like we know, most code is undocumented and more important, sources are lost ... Someone, one day, will have to deal with it ...

    1. bazza Silver badge

      Re: academics

      I spotted that too, and wondered how often those criticising academic computer scientist of the time actually had to deliver a useful system. They were probably jealous... Grace Hopper and colleagues did an excellent job of work with COBOL, even by today's standards; 60 years and still going strong is a testiment to that.

      I have seen serious systems done in Prolog, but it was a bit of a mess. The people doing it had a grip on how to write Prolog alright, but had no concept of how to get it running fast enough to be useful in their application (one failed specialised processing hardware procurement after another ought to have given them a clue). In the end Moore's Law solved the problem quicker than they could think about optimised bespoke kit, and it was moderately successful after that.

    2. Anonymous Coward
      Anonymous Coward

      Prolog

      I've mastered every computer language I've ever tried (and I've tried quite a few including numerous assemblers and functional languages) apart from Prolog which I never really grokked. Every time I thought I'd figured it out I wrote some test code that then did something rather different to what I expected. In the end I gave up. Its not because its declarative as I find SQL quite easy to work with, its just the way its backtracking system works is - for me - utterly bizarre and unintuitive. Obviously it requires a certain mindset I just don't have.

      1. Anonymous Coward
        Anonymous Coward

        Re: Prolog

        Prolog indeed requires a logical maths mindset ....

        I used to be ok with it, but really, as you stated, it's a niche which can only apply to certain rare people.

        In this regards, like I wrote (Original OP), it failed, as a computer language needs to be reachable to any computer scientist. It never was.

  9. Gene Cash Silver badge

    Assembler written in COBOL

    In one of my college courses, the term assignment was to write an assembler for a given ISA.

    One of my classmates wrote hers in COBOL, because she was just that badass.

    Edit: pissed the TA off because he had to learn how to use the COBOL compiler and such to run her work. It correctly processed the test data though, so he couldn't mark her down.

    1. A.P. Veening Silver badge

      Re: Assembler written in COBOL

      Must have been a lovely lass.

    2. Pascal Monett Silver badge
      Thumb Up

      Re: Assembler written in COBOL

      Sounds like she was seriously awesome.

    3. Anonymous Coward
      Anonymous Coward

      Re: Assembler written in COBOL

      I reckon the TA got off lightly; she might have written it in Whitespace, or BrainFuck.

      I've often though that Whitespace is the ideal language for submitting computer studies homework. You can submit it in printed form, and you can't be marked down for having got it wrong.

  10. TeeCee Gold badge
    Alert

    "...it has proved surprisingly resilient."

    OMFG, FIRE DIDN'T KILL IT! WHAT DO WE DO NOW?

    1. A.P. Veening Silver badge

      Re: "...it has proved surprisingly resilient."

      Just wait for it to die off, it can't take more than one or two billion years after the heat death of the universe ;)

  11. nematoad Silver badge

    Yes, but.

    I cannot code my way out of a paper bag but when I did a graduate conversion course in systems analysis and design one of the things we had to do was learn a couple of programming languages.

    One of them was Cobol.*

    Now as I say I could not write a program to save my life but I could understand Cobol. It took a while to sink in but I did manage to crank out the required programs and I passed the course. This ease of use by the uninitiated may be a reason why the language is held in low esteem in some quarters. Like the priests of a religion, many will feel that only the enlightened should be able to perform such rites.

    Another thing, with 60 years behind it I would guess that most of the bugs have been fixed and speaking as someone with very little money I feel better knowing that the system controlling my bank balance is run on a firm foundation. Though unfortunately I am currently with Nat. West :-( so the firm foundation may not be all that firm.

    * The other was Fortran, ugh!

    1. Anonymous Coward
      Anonymous Coward

      Re: Yes, but.

      Well, in these days of staying at home, at least as an intellectual exercise, it may be worth while doing a

      apt-get install gnucobol

      zypper in gnu-cobol

      yum install gnu-cobol

      as the flavour takes you.

      Then find some documentation, such as https://open-cobol.sourceforge.io/doc/gnucobol.html or https://riptutorial.com/cobol/ or download the pdf - https://riptutorial.com/Download/cobol.pdf - and knock your brain into gear, for some of us, a gear we'd long thought seized beyond repair.

      Could result in some fun outcomes, you never know.

    2. Pascal Monett Silver badge

      Re: Yes, but.

      Ah, Fortran. I think I still have the book on that.

      A surprising language. I'm rather glad I never had to use it professionally.

      1. Kernel

        Re: Yes, but.

        "Ah, Fortran. I think I still have the book on that.

        A surprising language. I'm rather glad I never had to use it professionally."

        My first attempts at programming were when I was still at school using a subset of Fortran known as "Portran" (Port-a-Punch Fortran).

        This used pre-punched cards that you attacked with a bent paper clip to push out the required chads to create the code on the cards. We learnt a lot about 'hanging chads', long before they became famous as a muddying factor in election results.

        Our completed stacks of cards were taken to one of the local banks, which would send them off to be batch-processed after their own jobs had been run (once a week and only if they hadn't used all their paid for machine time) - there is nothing like the disappointment of waiting 2 or 3 weeks to get your results back and finding the run had been sabotaged by a stray chad and that the result of all your work and patience was (IIRC) "Syntax error causes execution failure".

  12. Anonymous Coward
    Anonymous Coward

    COBOL is a well structured language, but is an absolute pain in the backside to work with. I cannot for one minute believe these archaic systems would not benefit from refactoring onto a platform that wasn't designed in 1974.

    Get your bloody chequebooks out and do it properly. And therein lies the problem with just about everything...

    1. Philip Lewis

      You think that because you don't know any better, or in the modern parlance, clueless.

      1. Anonymous Coward
        Anonymous Coward

        Hit me with those downvotes, oh yes. Clueless? I look after a whole bunch of systems written in a dozen languages including one whose internals are leftovers of COBOL. I can assure you the only one that is a pain to work with on modern systems is that one bit of garbage leftover. Pray tell, how do you find COBOL's interoperability with anything written this side of the 1990's? It's a sodding turd defended by "consultants" that earn a killing every time their "critical" application falls over in preference to refactoring applications onto tools fit for purpose.

        Pour on the hate.

        1. bazza Silver badge

          COBOL can be compiled to Java byte code and can fully interoperate with Java applications. That's just about this side of 1990...

  13. mmonroe

    ADD INSULT TO INJURY.

    PERFORM WHIPPING UNTIL SATISIFIED.

    among the very many fun COBOL statements

    1. A.P. Veening Silver badge

      Hmmm, Kinky COBOL, didn't know about that dialect yet.

    2. Mike Pellatt

      Ah, one to beat this one (from Sys V make, not gnu make unfortunately)

      $ make "Maggie resign"

      Don't know how to make Maggie resign. Stop.

  14. Anonymous Coward
    Anonymous Coward

    Oh great - webassembly

    So everyone hated Javas JVM and it was eventually binned from most browsers , yet give a virtual assembler a new name and some marketing buzz and suddenly the idea is everyones new best friend again. You have to laugh - talk about reinventing the wheel.

  15. rafff

    Is COBOL a language?

    Or is it a cluster of languages? Strictly within the COBOL standard, and without using any implementor-defined features, there can be 186000 different dialects. That is because the standard permitted (permits?) subsetting. Then there are, of course, also ambiguities in the standard and different compiler writers interpreted those differently.

    For 10 years in the 70s and early 80s I made a good living from doing COBOL-COBOL conversions.

  16. Not Enough Coffee

    I had a love/hate relationship with COBOL.

    I always thought "PLEASE" and "THANK YOU" should be a part of the syntax, just to complete its etiquette-like verbiage. Plus it would have made the compile errors more fun - "You didn't begin paragraph X with Please".

    1. Ken Moorhouse Silver badge

      Re: I had a love/hate relationship with COBOL.

      If you forget to wish it Happy Birthday you are likely to receive the following error:-

      Fatal error: But I'm not going to tell you what it is.

    2. Mike 16 Silver badge

      "PLEASE"?

      You'll be using Intercal then. (newer versions also include COME FROM, which is a good introduction to why exceptions might not be the best "first resort".

    3. Anonymous Coward
      Anonymous Coward

      Years ago I designed a "natural language" system to interrogate a server for data over XMPP. One of the kinks was that if you prefixed a command with "please" or a smily, it sent the verbose data back, omit the please and you got the minimum response.

      It was this feature that most amazed the people who tested it, yet it was just substituting "please" or ":)" for "verbose".

  17. Anonymous Coward
    Anonymous Coward

    moving away from COBOL

    One of the issue I've seen in moving off the M/F is the CISO demand to keep the full facility of RACF security on any new platform, which is (a) a waste of time and (b) very costly.

    Also I wonder in the new world of Kubernetes 12-factor'd interpreted scripted (cr)apps how many organisations realise they are paying AWS just as much money scaling up 100 pods of Node or Python to achieve the same performance as a couple of cores of compiled that doesn't stick a TCP/IP stack in between every function call </rant from grey-beard who should really retire>.

  18. Herbert Meyer

    examining picture carefully

    I look at the picture above the article carefully, I think I see a chart recorder. Chart recorders were not standard equipment for digital computers, so I suspect we are looking at a picture of an analog computer. Which did not run Cobol. Just Laplace Transforms. I cannot read the nameplate on the left end of the boxes, but it might say "Pace".

  19. briesmith

    Why COBOL?

    COBOL was part of a systems development mindset that basically revered error elimination. Systems were either accurately or precisely defined, sometimes both. Specifications were scrubbed until they gleamed. File definitions and record layouts were cast in stone and checked for consistency. Programmes were flowcharted before a single line was written and the flowcharts were examined for sensibility. Programmes were then, often, written in a near English language and desk checked. Then the coding started with each line commented as to its purpose, author, date etc. Compilations sometimes took hours so there was definitely no fail early, fail often attitude. And everything was documented.

    So I suppose what was written was accidently massively resilient and so it has turned out.

    The thing that trips up COBOL systems are the one-off programmes usually written to cater for some irregular event like the year end. These were rarely documented, were often written in extremis and constantly re-written or modified at least, every time they were run. Old hands remembered them and when to run them and when they didn't or were not around anymore, disaster often struck.

    It isn't just the COBOL language that is obsolete, it is the entire development culture it was part of. Now, languages come and go at a head spinning rate, the stuff written in them has the shelf life of a summer ice cream and the systems themselves are throw-aways.

    COBOL could be and has been revitalised over the years through the development of IDEs which overcome a lot of the wordiness and improve syntax and variable typing but the "get it right first time" culture it was part of will never come back. It's OK to write stuff that doesn't work these days, you just rewrite it until it does. Back in the 60s and 70s, it wasn't and programmers that did were frowned upon.

    And today's developers never get to feel that stomach tightening frisson of fear that "Enter Assembler" used to produce as you wrote it on your coding pad.

    1. Mike 16 Silver badge

      Re: Enter Assembler

      Not on the coding pad, but a fresh-out-of-school friend admitted, when applying for a job nominally involving PL/1 and COBOL, to experience in BAL (360 assembly). Got stuck for five years as the maintainer of those little snippets of library code that made the system actually work.

      1. James Anderson Silver badge

        Re: Enter Assembler

        IBM OS/MVS assembly language —- the language of the Gods.

        A thing of beauty that beats many so called high level languages for elegance and power.

        1. QuiteEvilGraham

          Re: Enter Assembler

          Sure is, although in old age much prefer the HLASM descendant & not having to keep one finger on the shift key as I type (so long as you remember that operands passed to macros *are* case-sensitive).

    2. a_yank_lurker Silver badge

      Re: Why COBOL?

      Getting it right the first time is always a good procedure for the medium to long term code stability. What is usually overlooked in half-assing the code and pushing it out is that the code will usually be used for a long time, conceivably a couple decades or more. Half-arsed code is more time consuming to update and maintain than well written code. This is language independent.

    3. Philip Lewis

      Re: Why COBOL?

      I can remember working at a client in the 80s, where we were allowed 2 compiles per DAY! This is the sort of limitation that encourages just the mindset and rigour you describe. I will admit to having written programs of several thousand lines that (s) compiled first time and (b) passed testing first time. We cared back then about what we wrote because the systems we wrote were the systems that WERE the company. Not surprisingly, many decades later, these systems, the legacy systems, are still the systems that decide if the company does business tomorrow.

      As an afterthought, in Michael Lewis's book Flashboys IIRC, quite a bit of the story partially revolves about "Russian programmers" and why they are so well respected. It seems they would have all been excellent COBOL programmers, as planning, rigour, structure etc. are part of their skill set.

      Which reminds me of Lewis's first book, Liar's Poker, which took place just down the corridor from my office at Goldman Sachs. At the time (1986) we were establishing the very basis for the GFC of 2008 and the entire system was written in --> FORTRAN. We had no Russians, but we really sweated the details and performance of the instrument valuation calculations.

    4. earl grey
      Angel

      Re: Why COBOL?

      "revered error elimination"

      Furthermore, the one shop where i worked we were not allowed to have any compile errors - not even warnings. That made it even more fun.

  20. Blackjack Silver badge

    I wonder if people are still using BASIC?

    A lot of stuff for computers running MS-DOS 2.0 and newer was rmade on BASIC (and later QBasic in machines that supported it). Mostly in schools, libraries and small business.

    Dosbox can run those with almost no problems but doesn't include printer support.

    I guess they have implemented a print to file option or opening the files with a newer program that can actually print them since it runs on Windows.

  21. Old Used Programmer Silver badge

    Been there, done that...

    As someone who spent far too many years writing and maintaining COBOL programs, I will attest that it is exceedingly verbose. Or, as I used to quip, it's the only programming language I know that is guaranteed to give you writers cramp.

  22. Alan W. Rateliff, II
    Happy

    Fun times were had

    I learned COBOL in high school on a System/34, among other system-related stuff. Up to then I had been a BASIC programmer with a sprinkle of TMS-9900 assembler and learning 6502. COBOL was fun, but I thought it lacked pizzazz; it was plain and not a very sexy language. Then we took a semester tryst with the mistress RPG-II and I learned the true meaning of pain. Twas impressed upon me early in life that the sparkly, sexy things are not always what they appear to be, and plain is just fine.

    Later in college I took a couple of COBOL classes. Actually had quite some fun with RM*COSTAR and brought a copy home to run in CrossPC (or was it PC Task?) on my Amiga. The next semester I found an Amiga native COBOL compiler and worked with the programmer to troubleshoot it so it would compile my class programs properly. This was about the time of the start of the Y2K panic, and while some of my class-mates dreamed of making huge bank by saving the world, for whatever reason I decided against such a path.

    I still thought I was pretty cool for being so young and having learned COBOL. That was until I met a guy roughly my age who programmed COBOL-II for a living. Funny thing about it, thinking about his personality, he and the language are a perfect fit.

  23. Screwed

    Generators

    I learned COBOL on ICL mainframes - which rather dates trhe experience! (Have since also used it on HP machines.)

    What fills me with horror is the thought of having to work on generated COBOL code. Things like QUICKCOBOL.I don't know, but I doubt the original generator tools still work and the code some of them produced was a dreadful rats nest.

    Plain, human coded COBOL, where the original authors tried to be clear, isn't too bad at all.

  24. Mike Pellatt

    My COBOL horror story is hand-tweaking the COBOL runtime overlays on RSX-11 to get every required one into memory for each overnight batch program on a banking system.

    Because an overlay had to be swapped in at all, the runs wouldn't complete overnight.

    That's what you call hand optimisation.

    1. Bitsminer Bronze badge

      Ahh the joys of a 16-bit machine, with aspirations of greatness.

      DId you ever look over the overlay plan for the filesystem ACP? Now that was an admirable thing. Two dozen or more overlays, if my foggy memory remembers.

      I do not fondly remember RSX-11 sysgen.

  25. spold Silver badge

    BEGIN

    BEGIN

    outstring("ALGOL notably ALGOL 60 International Algebraic Language (IAL) is the common ancestor of all modern programming languages including all the C ones");

    outstring("I was programming this when you were but knee-high to a grasshopper");

    outstring("Why do you think the f***ing semicolon was invented?");

    outstring("SIMULA - 67")

    END;

    I can't even remember if this would parse correctly - error at line 42

    p.s. don't forget Fujitsu Visual Cobol

  26. earl grey
    Facepalm

    JCL or ECL

    Both can come back to bite you in the arse.

  27. I Am Spartacus
    Childcatcher

    Hello World in Cobol

    The issue is not how long Hello World is in Cobol (it's 5 lines, if your asking).

    No, the problem is how long the JCL is to compile it on IBM/MVS - that can be twice the size of the program. EASILY!

    Oh, and only truly experienced programmers remember that the compiler was called: IGYWCLG

  28. Andre 3

    Where's the RPG version?

    Ideally with a DB2-compatible file system and backend.

  29. Trbonja

    This old COBOL language shit needs to finally die. I'm sick and tired of old school programmers who think they are gods and yet they can't grasp the concept of basic network connectivity, never mind security... If COBOL language and to some extent as400 is a dog, it should be be taken out in to woods, shot and corps burned 'till nothing is left.

    There are exceptions to old school programmers but I have met very few over the years.

    1. Anonymous Coward
      Anonymous Coward

      Have an upvote. People hated my hate on COBOL above, so I'd be happy to share some more!

      The programming gods are the good people that squeeze complex algorithms into small, human readable and elegant code. No programming god, therefore, ever achieved godhood using COBOL. It's just too verbose, rather like this post of mine. Even in 1980 there were a raft of much more capable languages readily available, with better support for complex data structures. B and Fortran for two.

      COBOL has just two data types. The limited options and constructs in COBOL have some advantages - there are fewer opportunities for syntax and type mismatch errors. Strong typing and pre-declaring everything while not convenient, are one of the things I like about C as well. So there are some upsides to it.

      And then, the downsides. It's terrible for writing quick, trivial tools. The prevalence of GOTO statements have every programming academic of the last 60 years cursing its existence. The interoperability is on a good day, poor. The supposed "COmmon" language, actually, isn't common at all with literally dozens of dialects in circulation with minor differences. The Business (upper-case B) emphasis element seems to be code for printing consultants Business' revenue.

      You know those awful programs that prevail in your business, the ones mashed up in Excel and VBA you can't get rid of without spending money on doing them properly? COBOL was the Excel/VBA mash up of it's day, and like a bad rash, you can't easily get rid of it.

      Beer time :-P

      1. Trbonja

        That's Just it. Last 10 years I had misfortune to run in to programmers with god complex and yet their code is a crap and they can't be bothered to figure out why is it unreliable. They are good at scheming . backstabbing and spending money or "critical tools" when those tools are just covering their incompetence.

        I'm not a programmer by trade as I find it to boring but I don't shy away from coding and checking the code to fix "network problem"but the crap I find lately just can't be be unseen. As for security..all access points wide open and "security" is implemented by hiding commands behind menus with every user profile having qsecofr level access...

        Lattelly I run in to many shops with this crap and it is getting annoying. I just want one decent project where programmers can think outside of box and see whole picture, not just "my-code-is-best-everything-else is unimportant"

        Beer will not do it this afternoon for me. Vodka will ;-)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021