Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
INVALID key in VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Tue Jul 29, 2008 5:05 pm    Post subject: INVALID key in VSAM
Reply with quote

Hi,

I have the below piece of code in my program.

READ FILEA
INTO A-RECORD
INVALID KEY
MOVE 'TEST' TO WS-OUT


Here FILEA is KSDS file, ORGANIZATION IS INDEXED and ACCESS IS RANDOM.


When INVALID KEY will execute? what does INVALID KEY means here.

Thanks in advance.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jul 29, 2008 5:19 pm    Post subject:
Reply with quote

Have you tried the fine manual?

O.
Back to top
View user's profile Send private message
chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Wed Jul 30, 2008 12:03 pm    Post subject: Reply to: INVALID key in VSAM
Reply with quote

ofer71,

I have looked into the manual using the link you provided but I could not be able to get anything fruitful.

Could you please let me know for what instances INVALID KEY phrase executes?

Thanks in davance.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Wed Jul 30, 2008 12:39 pm    Post subject:
Reply with quote

Hi chinnielr,

Invalid key clause will be executed when you are trying to read a record that is not present in fileA. i.e. file status 23.


thanks,
Santosh.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Jul 30, 2008 7:45 pm    Post subject: Re: Reply to: INVALID key in VSAM
Reply with quote

chinnielr wrote:
ofer71,

I have looked into the manual using the link you provided but I could not be able to get anything fruitful.

Could you please let me know for what instances INVALID KEY phrase executes?

Thanks in davance.
You looked in the fine manual and you did not see this?
"Execution of a format 2 READ statement causes the value of the key of reference to be compared with the value of the corresponding key data item in the file records, until the first record having an equal value is found. The file position indicator is positioned to this record, which is then made available. If no record can be so identified, an INVALID KEY condition exists, and READ statement execution is unsuccessful. (See "Invalid key condition" under "Common processing facilities" in topic 6.1.8.9.)"
I think you might be in the wrong profession.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us