Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Random read error when file is read

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Fri Jan 23, 2009 10:47 am    Post subject: Random read error when file is read
Reply with quote

Hi Folks,

Can someone help me out in solving the issue.

I am encountering following problem when a job is ran.

"A2ED REQ=13 STA=23 RC=080006 LOC=R1ED MSG=SHRTMSG - READ ERROR - A2ED
AN ATTEMPT WAS MADE TO RANDOMLY ACCESS A RECORD
THAT DOES NOT EXIST."

My findings are
1)I checked out the file if any records are missing by putting display.
But could not find any missing record.

....thanks
2)When the job is restarted it went fine.

what might be the reason for such scenario.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Fri Jan 23, 2009 2:18 pm    Post subject: Reply to: Random read error when file is read
Reply with quote

do not pester people by double posting,

replying is on voluntary basis and KNOWLEDGE
if You did not get any replies, maybe nobody knows

Your other post has been deleted
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Jan 23, 2009 3:10 pm    Post subject:
Reply with quote

or possibly a little more information describing the environment, etc...
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Fri Jan 23, 2009 3:43 pm    Post subject:
Reply with quote

Environment is Production environment.

what exactly is happening is during Batch run,

My program is reading several files and writing one output file.

But while reading one of particular file it gives the above mentioned error.
and my job is failing.

and when i restart the job, it is going fine.

if further details are required please do ask.

...thnx
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Jan 23, 2009 4:32 pm    Post subject:
Reply with quote

By environment i meant: MVS/VM - OS390/z/os ???

the error message is new to me. In fact, I can not find it in the IBM library.

what kind of cobol is this? are there other error messages produced that we might recognize?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jan 23, 2009 5:03 pm    Post subject:
Reply with quote

Is the file used by another process (CICS, for example)? Can you run with DISP=OLD on the file?
Back to top
View user's profile Send private message
Shashank.kapoor

New User


Joined: 14 Jan 2009
Posts: 24
Location: Mumbai

PostPosted: Fri Jan 23, 2009 5:36 pm    Post subject: Reply to: Random read error when file is read
Reply with quote

Hi Jayadev,

Could you please provide us the details of the file and record on which job is abending.
Just Curious:
1) It is abending on the same record or position every time?
2) Type of file i.e. KSDS or RRDS, Its organisation and access mode.
3) How you are fetching the record.

This is strange to see that once you restart the job, it goes fine with the same record. Trying to figure out the error code you have mentioned in your post.
Do you have an ABENDAID. If yes, then is it possible for you to provide us the details of the record from it.

Thanks & Regards,
Shashank Kapoor
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Sat Jan 24, 2009 11:46 am    Post subject:
Reply with quote

hi shashank

From abend-aid i could not get record details.

but,

1)File type is KSDS.
2)Access mode is Random read.

...thnx
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: Sat Jan 24, 2009 9:28 pm    Post subject:
Reply with quote

Hello,

Is this batch or online?

Which versioh of which cobol compiler is being used (the compiler will show the version in the compiled output)?

Which version of which operating system is being used?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Jan 25, 2009 10:25 am    Post subject:
Reply with quote

The error message you posted appears to be generated from the program. The "STA=23" looks like a file status but not one that the system would generate. I'd add a display of the key that you attempted to read when encountering any non-zero file status. Are you checking the file status of every I/O against this KSDS file?
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Sun Jan 25, 2009 10:55 am    Post subject:
Reply with quote

Folks,

I found out the reason for the abend.

Actually, during the execution of above abended job, another job was running in parallel which was updating the records for the same file.

When the abended job was trying to fetch for the record from file it could not find that record because parallel job did not update that particular record in the file at that instance.

This is a Batch process.

....thnx for your support
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: Sun Jan 25, 2009 12:16 pm    Post subject: Reply to: Random read error when file is read
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us