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

File reading stops once VSAM file status 23.


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

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Tue Oct 23, 2007 6:50 pm
Reply with quote

Hello Friends,

I have two KSDS VSAM files, say A and B. Both have the same keys.
I have some entries (records) in A which may or may not be present in VSAM file B.
My requirement is to read from A and check if the same entry exists in file B.
If present, then set a Working storage flag to Y, then process further.
If the entry is not found in VSAM File B, then we should continue with reading the next record from VSAM File A and continue checking in File B if entry is present.


My problem is:

When the entry is not found in File B, the VSAM file Status is set to 23 i.e. record not found. Now instead of continuing to read the next record in file A, it is coming out without reading any further records from file A and stops comparing with file B.

It would be very nice of you if you could help.

Thanks
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Oct 23, 2007 9:24 pm
Reply with quote

It's your program logic that is causing that action, only you can fix it....
In other words, why does the program stop reading A when B returns a no rec found?
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 Oct 23, 2007 10:07 pm
Reply with quote

Hello,

It sounds like your program was built using "old" code that considers a "not found" a fatal error.

A "not found" may be perfectly acceptable (as is your case).

Once you change the code to conitinue processing when there is a "not found", you should be "good to go".

Someone will be here if there are questions icon_smile.gif
Back to top
View user's profile Send private message
kabyab

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Thu Oct 25, 2007 2:46 pm
Reply with quote

Thanks for your replies. As suggested I have made changes to the processing, Now I am continuing to read from the file A irrespective of whether the record is found or not in File B. The code is working fine now ..... thank you .
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: Thu Oct 25, 2007 7:49 pm
Reply with quote

You're welcome icon_smile.gif

Thank you for posting your resolution.
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 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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top