Coding to prevent table overflows withing programs

Buffer overflow
In this new world of zero tollerance for abends and the goal of 100% production stability, I have been charged with determining the best method to prevent abends due to internal program table overflows.  Our environment has Cobol, Eztrieve and Assembler programs with internal tables.  We are looking to replace hard-coding of occurs clauses with a new method to dynamically increase table space if needed.  I don't know the best or simplest method or if there is a method that can be applied to all our programming languages.  My suggestion was to set a threshold value to indicate if the table was close to max and send a message to support that the table is getting ready to overflow.  This method is easy and could be applied to all laguages, but my mgmt. voted this down because it "doesn't guarentee" the prevention of an abend.  Another suggestion was the use of Dynamic Table Expansion using MICM tables.  I haven't completely figured out how this works and I'm not sure it this can be applied to all laguages, it also appears to require alot of coding. Another co-worker said that they have heard of coding a file FD where Cobol treats the file as a table and you don't have to specify an occurs.  I have not found any documentation on this method.  Please lend your advise and point me to any examples and resources that might be available.  Thanks very much for your assitance.

Software/Hardware used:
Mainframe computer using Cobol, Assembler and Easytrieve

Answer Wiki

Thanks. We'll let you know when a new response is added.

We used that method back in the early seventies when memory was maxed out at 16k total. Instead of writing to an array (or table) you write to a file. The same exact information in the record as your table would have had. The index becomes the record number! There are far too many different ways of doing it to go into here. But it’s really a very simple concept.

Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • NanetteHaraden
    I realize there are many ways of going about this, that is why I asked the question. I wanted your advise/expertise on what you consider the "best method" and what is more state of the art instead of some of the other methods used in the past. What would you do? Why? And where can I get a coding example?
    20 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: