MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VSAM key not found error in COBOL
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Nov 20, 2008 4:09 pm    Post subject: Reply with quote

kavi,

What about the access method coded in the FD of the vsam file?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Thu Nov 20, 2008 4:37 pm    Post subject: Reply with quote

Kolusu,

Please refer the FD section for this.
Code:

SELECT XXXXXXXX              ASSIGN       TO XXXXX       
                             ORGANIZATION IS INDEXED     
                             RECORD KEY   IS             
                                   XXX-2000-XXXXXXXX-KEYS
                             ACCESS       IS DYNAMIC     
                             FILE STATUS  IS STATUS-CODE.


Thanks,
Kavi
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Fri Nov 21, 2008 10:04 am    Post subject: Reply with quote

You need to capture the value of the key immediately before the READ and display it, or better yet, write it to a temp file. When you get a not found and issue the START/READ, and the READ returns a record, display/write the key from that too.

One other thing. Are you rebuilding the key after you CLOSE and the OPEN the VSAM file? Also, try changing the START to use = rather than >=.

At this point, you've sent the FD and the key layout. I think it would help if you posted the code used to build the key.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group