IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Cobol: Random Read Error in Production

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC
Goto page 1, 2  Next
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
View previous topic :: View next topic  
Author Message
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Wed Sep 24, 2008 3:59 pm    Post subject: Cobol: Random Read Error in Production  

Hi All,

I encountered a peculiar scenario in production.
A program tried reading a record randomly (KSDS file)
and it abended with 'Record not found - File status 23'.
But the record is present in the file.

When the job was rerun, without making any changes to data,
job ran successfully.

This issue occurs rarely, but certainly it require a fix.
Can anyone share their thoughts on it?

Please note, that it is a daily executed job.

Regards
Vamshi
Back to top  
CICS Guy



Joined: 18 Jul 2007
Posts: 1199
Location: At my desk

Posted: Wed Sep 24, 2008 4:29 pm    Post subject:  

Was the dataset open to another region, such as a CICS?
Back to top  
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Wed Sep 24, 2008 4:38 pm    Post subject:  

Dataset was NOT open to other regions.
It was Closed Disabled in CICS region.

Regards
vamshi
Back to top  
Cristopher



Joined: 31 Jul 2008
Posts: 39
Location: NY

Posted: Wed Sep 24, 2008 5:20 pm    Post subject: Reply to: Cobol: Random Read Error in Production  

Hi,
Did u check the timestamp ( if present in the file).
Probably it was written after the read was performed.

Cris
Back to top  
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Wed Sep 24, 2008 5:54 pm    Post subject:  

Hi Cristopher,

The file is opened in INPUT mode only, and the record exists
from long time, i.e not added in that batch.

I am making a wild guess, Does CPU % not available during
that read, could cause such abend?
Back to top  
CICS Guy



Joined: 18 Jul 2007
Posts: 1199
Location: At my desk

Posted: Wed Sep 24, 2008 5:57 pm    Post subject:  

mainframesguru wrote: I am making a wild guess, Does CPU % not available during that read, could cause such abend? No way.... :roll:
Back to top  
dick scherrer



Joined: 23 Nov 2006
Posts: 8723
Location: 221 B Baker St

Posted: Wed Sep 24, 2008 9:54 pm    Post subject:  

Hello,

Most likely, there is a problem in the code. Some variable is not properly initialized or set to some current proper value.

Is the "not found" always the same record?
Back to top  
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Thu Sep 25, 2008 11:23 am    Post subject:  

Hi Dick,

No. It is not always the same record.
And if the problem is with logic, then rerunning the same job, without any changes, would have caused the abend again...isn't it?
Back to top  
eHorizon.Andrew



Joined: 18 Jan 2007
Posts: 25
Location: China,zhejiang,hangzhou

Posted: Thu Sep 25, 2008 12:31 pm    Post subject:  

is that file only used by your program? only reading action?...
Back to top  
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Thu Sep 25, 2008 12:33 pm    Post subject:  

Hi,

It is used by other programs/Jobs also.
Back to top  
enrico-sorichetti



Joined: 14 Mar 2007
Posts: 3153
Location: italy

Posted: Thu Sep 25, 2008 12:36 pm    Post subject: Reply to: Cobol: Random Read Error in Production  

when you get a no record found issue a message followed by an abend,
look at the dump for storage overlays or unfriendly patterns
Back to top  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1633
Location: germany

Posted: Thu Sep 25, 2008 12:37 pm    Post subject:  

Quote:
And if the problem is with logic, then rerunning the same job, without any changes, would have caused the abend again...(sic)isn't it?


well, you have convinced yourself that something is wrong with the operating system
or that a program will run differently when it receives fewer time slices than when there is little running in the system.

your manager is responsible for teaching you good debuging techniques and helping you to change your perspective.

we can only tell you what is probably wrong.
Dick Scherrer has provided you with the probable course of actiion to take -
debug you program and stop looking for reasons outside of the code as the problem - i.e. stop making assumptions.

your attitude, which is prevalent among most coders/programmers,
is the reason that consultants have opportunities for work. We don't make assumptions.
Back to top  
mainframesguru



Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

Posted: Thu Sep 25, 2008 12:52 pm    Post subject:  

Hi

Thanks for your kind advice.

As you said, logically speaking, if there is a problem with the code,
Then even if we execute the program 1000 times with same data,
the output should never vary.

But in this case, when we encounter the 'Random Read Error' and
reran the job again, it went fine. I hope you got the point.

I would check the suggestion provided by enrico sorichetti and Dick.

I would have been happy, if you had a point for resolution.
Back to top  
Anuj D.



Joined: 22 Apr 2006
Posts: 2217
Location: Phoenix, AZ

Posted: Thu Sep 25, 2008 1:01 pm    Post subject:  

Hi,

Please post he SYSDUMP & SYSOUT of abended JOB if possible.
Back to top  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1633
Location: germany

Posted: Thu Sep 25, 2008 2:31 pm    Post subject:  

Quote:
I would have been happy, if you had a point for resolution


we(I) did, proof your code, all the code, instruction by instruction.
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL Goto page 1, 2  Next
Page 1 of 2
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM