View previous topic :: View next topic
|
Author |
Message |
JAYADEV.G
New User
Joined: 13 Apr 2007 Posts: 11 Location: hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
probably has to do with the 7th record in the file. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
No Dick, since the 7th record is not there, it's the 8th record. |
|
Back to top |
|
|
JAYADEV.G
New User
Joined: 13 Apr 2007 Posts: 11 Location: hyderabad
|
|
|
|
common people don't play games. I am having genuine problem please try to help me. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Jayadev,
your basic problem is defining the problem. |
|
Back to top |
|
|
JAYADEV.G
New User
Joined: 13 Apr 2007 Posts: 11 Location: hyderabad
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
investigate the approach suggested by Robert in the first reply,
You are expecting too much, giving too little |
|
Back to top |
|
|
JAYADEV.G
New User
Joined: 13 Apr 2007 Posts: 11 Location: hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
JAYADEV.G
New User
Joined: 13 Apr 2007 Posts: 11 Location: hyderabad
|
|
|
|
hi TANSTAAFL
so you mean to say that record is definetly maintained.
Can u explain this in a bit detailed manner |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|