Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us