View previous topic :: View next topic
|
Author |
Message |
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
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 |
|
|
|