One of our Job was executing for long in production. It was told that the program executing in the job is gone is loop. Later the support identified that the a COBOL table in program was overflowed and that is why the job went in loop.
Should not the job be abended if the table was overflowed? And when it was overflowed and in case, it writes to a database, is there not a chance that it might write something totally wrong? What is the solution for it?
Program went in loop.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Program went in loop.
A COBOL program will not ABEND just because a table overflowed -- although depending upon the circumstances, the system may generate a S0C4 storage ABEND (but maybe not). There is a compile option, SSRANGE, that allows runtime checking of tables -- up through Enterprise COBOL V4, runtime option CHECK(ON) is required to use it but V5 and V6 COBOL automatically use runtime checking if SSRANGE is the compile option. There is a performance penalty for using SSRANGE, however.
Yes, if the table overflows it is entirely possible for the program to write garbage to any output (database or file). Whether or not garbage is written will depend upon the program and a generic answer is not possible.
- use SSRANGE checking and take the performance hit
- use table subscript range validation for every place in the program that writes the table, which requires coding changes (possibly extensive)
Yes, if the table overflows it is entirely possible for the program to write garbage to any output (database or file). Whether or not garbage is written will depend upon the program and a generic answer is not possible.
A couple of possibilities exist:What is the solution for it?
- use SSRANGE checking and take the performance hit
- use table subscript range validation for every place in the program that writes the table, which requires coding changes (possibly extensive)
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute