Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Cobol: Random Read Error in Production

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Cobol: Random Read Error in Production
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 24, 2008 4:29 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Cobol: Random Read Error in Production
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 24, 2008 5:57 pm    Post subject:
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

Site Director


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

PostPosted: Wed Sep 24, 2008 9:54 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Hi,

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Sep 25, 2008 12:36 pm    Post subject: Reply to: Cobol: Random Read Error in Production
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Sep 25, 2008 1:01 pm    Post subject:
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    Post subject:
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    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Thu Sep 25, 2008 5:52 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us