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

Random read error when file is read


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 23, 2009 2:18 pm
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: 6966
Location: porcelain throne

PostPosted: Fri Jan 23, 2009 3:10 pm
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
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: 6966
Location: porcelain throne

PostPosted: Fri Jan 23, 2009 4:32 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 23, 2009 5:03 pm
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
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
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

Moderator Emeritus


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

PostPosted: Sat Jan 24, 2009 9:28 pm
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
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
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

Moderator Emeritus


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

PostPosted: Sun Jan 25, 2009 12:16 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top