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

Record not found


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
suraaj

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Tue Jul 16, 2013 6:04 pm
Reply with quote

Hi

I have opened a VSAM file in I-O mode and trying to check randomly if there is a record present based on a key. Its returning a file status of 23 which means record not found. But when I check manually with the key the record is present. I have checked the forum for suitable solution but was unable to find any solution. Please help.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 16, 2013 6:17 pm
Reply with quote

What the 23 is telling you is that one (or more) of the bytes of the key that you are reading in your program do not match the key you found manually. Post (using the Code button) the hexadecimal display of the key you found manually, and the code you are using to read that key. If there were hexadecimal '00' values in the key, you might see it as having spaces and attempt to read it as such, but spaces are X'40', not X'00'.
Back to top
View user's profile Send private message
suraaj

New User


Joined: 16 Apr 2009
Posts: 69
Location: Canada

PostPosted: Tue Jul 16, 2013 7:03 pm
Reply with quote

The key is X(19) with numeric data so the data is showing as digits. Its not packed.

Quote:
Post (using the Code button) the hexadecimal display of the key you found manually

Please advise if anything else was expected for the key.

I am reading a key value from another QSAM file and checking with the key in the VSAM. This key which I have from the QSAM I am moving to a key field and reading the file using the key. The command is simple READ after the movement.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 16, 2013 7:46 pm
Reply with quote

You may post what you want, although you have not yet posted a single thing I asked for.

The bottom line: a file status 23 code means you attempted to do a START or keyed READ of a file and the record you attempted to read is not found in the file. You may think you can find the record in the file manually, but the record you are finding in the file manually is NOT the record the program is reading -- period. As long as you refuse to accept that the program is not finding the key value in the file, you will not be able to proceed any further.
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: Tue Jul 16, 2013 8:50 pm
Reply with quote

Hello,

Keep in mind that IEBIBALL (eye-ball) is more forgiving than one's "own code" . . .

Check to make sure the value is in the proper positions in the record.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Tue Jul 23, 2013 12:34 pm
Reply with quote

Have you defined the dataset with the correct KEYOFF value :¬#

I'm assuming it is a KSDS but you don't even specify if that is the case
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top