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
 

 

READ ERROR TO RANDOMLY ACCESSED RECORD IN VSAM FILE

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

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Wed Sep 02, 2009 6:13 pm    Post subject: READ ERROR TO RANDOMLY ACCESSED RECORD IN VSAM FILE
Reply with quote

Hi,

I have a problem like during my batch run, one particular job is trying to read file for a particluar record and when that record is not found, job fails with u999 giving STA=23.

After few minutes without any fix when I restart the job, job goes fine.

Can anyone tell me why it has happened.

Thanks/Jai
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Sep 02, 2009 6:43 pm    Post subject:
Reply with quote

Is the file updated online while the batch program is accessing it? If so, the online system might be adding records that are interfering with the batch processing. If not, then your program has some combination of conditions that cause the record key it attempts to read to be invalid (as in, not found in the file). Finding those conditions requires scanning the source code to find out what is causing the issue -- also known as debugging.

The bigger issue in my mind is why does the program abend when it cannot find a record -- shouldn't it just display an error message and continue?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Sep 02, 2009 6:43 pm    Post subject:
Reply with quote

probably has to do with the 7th record in the file.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


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

PostPosted: Wed Sep 02, 2009 7:39 pm    Post subject:
Reply with quote

No Dick, since the 7th record is not there, it's the 8th record. icon_lol.gif
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Wed Sep 02, 2009 8:16 pm    Post subject:
Reply with quote

common people don't play games. I am having genuine problem please try to help me.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


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

PostPosted: Wed Sep 02, 2009 8:22 pm    Post subject:
Reply with quote

I don't want to speak for Dick, but I suspect both he and I are trying to say that you didn't provide enough information in your original post to be of much help. Please follow Robert's debugging suggestion.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Sep 02, 2009 8:23 pm    Post subject:
Reply with quote

Jayadev,

your basic problem is defining the problem.
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Wed Sep 02, 2009 8:33 pm    Post subject:
Reply with quote

dick,

let me explain u again what my problem is

during my batch processing, one of the batch job is trying to read a record of particular file, it failed because it could not find record.

When i restarted the job , it went fine.This job has only one step.
I have checked whether that particular record is being maintained in online.But it is'n the case.

so what could be the reason that is what for i have posted this query.

I think Dick Brenholtz u understood what my query is.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Sep 02, 2009 8:41 pm    Post subject:
Reply with quote

Quote:
to read a record of particular file

what kind of file?
what kind of read?
Select, FD statements and I/O commands used.

Quote:
it failed because it could not find record.


failed? what is the file status after your read? are you using the simple
2 char file status or the expanded file status clause?

what are the responses you receive in the status fields?

Quote:
I have checked whether that particular record is being maintained in online.But it is'n the case.


maintained?

is the record in the file or not?

if vsam, what are the share options?

Still don't have enough info to make a suggestion.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Sep 02, 2009 8:43 pm    Post subject: Reply to: READ ERROR TO RANDOMLY ACCESSED RECORD IN VSAM FI
Reply with quote

investigate the approach suggested by Robert in the first reply,

You are expecting too much, giving too little icon_evil.gif
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Wed Sep 02, 2009 9:47 pm    Post subject:
Reply with quote

Hi Dick,


1)File is VSAM file. It was read in Dyn Input mode.
Select clause does not have any info except file name.
FD also does not have file length except that file layout is mentioned.

2)File status is 23. I am using simple 2 char file status.

I did not get this query
"what are the responses you receive in the status fields?"

3)File is not maintained.Record is also not found in the file.
VSAM file SHAREOPTIONS(2,3).

DICK I think I have provided details which u require.I am ready to provide whatever details u want. Thing is that i want to resolve this issue. Guys please help me.

Thanks/Jai
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Sep 02, 2009 9:49 pm    Post subject:
Reply with quote

Quote:
I have checked whether that particular record is being maintained in online.But it is'n the case.
Uh, you ARE aware, aren't you, that VSAM implements locking at the CI level, not the record level -- so your statement here is absolutely, categorically nonsense. ANY record in the CI being updated online would result in your record not being available -- not just the one you're looking at. Depending upon the record length and the CI size, that could be quite a few records.
Back to top
View user's profile Send private message
JAYADEV.G

New User


Joined: 13 Apr 2007
Posts: 11
Location: hyderabad

PostPosted: Wed Sep 02, 2009 10:04 pm    Post subject:
Reply with quote

hi TANSTAAFL

so you mean to say that record is definetly maintained.

Can u explain this in a bit detailed manner
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Sep 02, 2009 11:04 pm    Post subject:
Reply with quote

Depending upon the VSAM parameters (record length, CI size, free space), there could be anywhere from 1 to thousands of VSAM records in a single CI. When VSAM is updating a record (online or batch), the entire CI is locked -- not just the one record being changed. And without looking at a lot of hex values, you do not know which records are in which CI unless you've just unloaded and reloaded the VSAM (in which case you could do the calculations to determine which records are in a CI). So your batch job would not be able to get to the record while the online system is updating any record in the CI.

There is a Redbook at the IBM site called VSAM Demystified. It would be worth your while to read this Redbook.
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 -> JCL & VSAM 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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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