IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cobol: Random Read Error in Production


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Wed Sep 24, 2008 3:59 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 24, 2008 4:29 pm
Reply with quote

Was the dataset open to another region, such as a CICS?
Back to top
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Wed Sep 24, 2008 4:38 pm
Reply with quote

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

Regards
vamshi
Back to top
View user's profile Send private message
Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Wed Sep 24, 2008 5:20 pm
Reply with quote

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

Cris
Back to top
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Wed Sep 24, 2008 5:54 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 24, 2008 5:57 pm
Reply with quote

mainframesguru wrote:
I am making a wild guess, Does CPU % not available during that read, could cause such abend?
No way.... icon_rolleyes.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 24, 2008 9:54 pm
Reply with quote

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
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Thu Sep 25, 2008 11:23 am
Reply with quote

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
View user's profile Send private message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Thu Sep 25, 2008 12:31 pm
Reply with quote

is that file only used by your program? only reading action?...
Back to top
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Thu Sep 25, 2008 12:33 pm
Reply with quote

Hi,

It is used by other programs/Jobs also.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 25, 2008 12:36 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 25, 2008 12:37 pm
Reply with quote

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
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Thu Sep 25, 2008 12:52 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 25, 2008 1:01 pm
Reply with quote

Hi,

Please post he SYSDUMP & SYSOUT of abended JOB if possible.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 25, 2008 2:31 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 25, 2008 3:34 pm
Reply with quote

In addition, you said the code did not change from run to run.

either the code has a problem or the data was different.
I doubt if the computer burped.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 25, 2008 5:52 pm
Reply with quote

Suggestion: if the program does not have the VSAM extended file status codes in it, add them and recompile so the next time a 23 file status is returned you can display the extended file status data as well. That would allow the return code, function code, and feedback code which would provide additional data that just a 23.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Error when install DB2 DB2 2
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top