Principles of Programming: Reliability

One area of proper programming practice which I see being neglected is the matter of reliability.

For decades, COBOL programmers (and Assembler programmers alike) have known that one ought to check for success or failure after opening a file. (And there is a feature in some levels of COBOL which, depending upon installation options, will allocate, write to, and then delete a file pertaining to a missing DD statement. Obviously, failure to check for the success or failure can produce incorrect output or failure to observe errors or issues in the code.) Or, one may simply get a S0C4 ABEND as punishment for not checking for OPEN success.

But beyond that, for example, one ought not to use IKJEFT01 for invoking REXXes or CLISTs in production batch, as that entry point of that program does not NECESSARILY return indication of sub-ABEND error. So your REXX or CLIST might be missing or fail and, depending upon the nature of the failure, your job fail to notify the operating system (and the scheduler) of the failure. In a former job, when this was presented to management (with the recommendation to use IKJEFT1A or IKJEFT1B, both of which do return indication of sub-ABEND error) my boss's approach to fixing this was to state that people would be assigned to read the job messages of every job using IKJEFT01. But that is fundamentally against principles of reliability. If detection of errors must depend upon human beings checking for error messages, one can well expect downstream jobs or processes to be triggered inappropriately, and the farther one gets into a problem situation before the problem is discovered, the worse recovery will be, generally speaking.

The modern concept of a "feedback loop" is key here. Wherever feasible, one ought to KNOW that one has had success so far before proceeding with processing.

Another example of improper architecture is that in a former job, they used a data transfer program product which has the ability to respond indicating whether the transmission was or was not successful. But they didn't make use of that. I was told that the only way anyone knew in that shop whether the transmission worked or not was to go and manually check the statistics and messages generated by the product.

This kind of (pardon me) irresponsibility lends itself to elongating problem situations and impacting availability.

I understand that in Java programming, one must take extra steps as well to ensure that issues are handled, such as "try/catch" constructs. Maybe people don't do that as often as they should, and maybe that is why my cell phone misbehaves so very often.... What good is a "smart phone" if the programmers responsible for it do not do their "due diligence"?

Likewise is the failure to use the tools available in a given batch scheduler to NOT trigger follow on jobs if serious errors are encountered. Pretty much every mainframe z/os scheduler has these tools, and use of them can save the programmer sleepless nights.

Early on in my career, I was taught "Defensive Programming," namely, to anticipate potential errors and prepare the code to handle them. THAT, it seems to me, is the right approach.



To view or add a comment, sign in

More articles by Dorothy Young

  • Disusting

    I have been applying for jobs for a very long time now, and I find it nothing less than disgusting when the pages in…

  • COBOL

    I know COBOL and am currently unemployed. The first few states that contact me and give me access may have my services…

  • Remember Y2K?

    It is difficult to believe that Y2K, a remarkable non-event, happened 20 years ago. How time flies when one is having…

  • Forward to the Past

    George Santayana once said, “Those who cannot learn from history are doomed to repeat it” or something like that. Way…

  • Danger Areas for Continuous Delivery

    Though Continuous Delivery sounds like a very good idea, SOMETIMES it might not be. Some mainframe software could be…

  • Wrongful Termination and its Aftermath 15 Years Later

    So I worked for a certain company in a testing group, testing an application that the client decided to not modify…

  • Blockchain: a Few Stupid Questions

    Maybe I just don't know enough about Blockchain, but I do have a few concerns and questions based upon the courses I…

  • System Independent Debugging

    Slanted Towards Endevor Support With Apologies to Dave Alcalay, who originally wrote a document of the same title and…

    1 Comment
  • Assembler, Archaic? COBOL, Obsolete?

    I just read an article from 2009 in which the writer called COBOL "nearly obsolete" and Assembler "archaic" and advised…

    6 Comments
  • The Turn of a Phrase

    Sayings, mostly collected in meetings, but not all. The Turn of a Phrase “I am going to shed a little bit of update on…

Explore content categories