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

Alternate key declaration


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

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Mon Jun 21, 2010 4:35 pm
Reply with quote

While declaration a file which is used for alternate key

do we need to delcare primary key also.

for example :

RECORD KEY IS S1-PRIMARY-KEY
ALTERNATE KEY IS S1-ALT1-KEY
ALTERNATE KEY IS S1-ALT2-KEY

Please suggest.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 21, 2010 5:29 pm
Reply with quote

If you review the syntax diagram (see the COBOL Language Reference manual in the manuals link at the top of the page), you will see that for an indexed file, the RECORD KEY clause is not optional -- whether or not there is an alternate index.
Back to top
View user's profile Send private message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Mon Jun 21, 2010 5:45 pm
Reply with quote

Thank you very much for your reply.
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 Add column to existing records using ... JCL & VSAM 2
No new posts Issue in KWIKKEY utility while creat... JCL & VSAM 2
This topic is locked: you cannot edit posts or make replies. VSE COBOL - File Status 46 when readi... COBOL Programming 8
No new posts ALTERNATE RECORD KEY usage for KSDS AIX COBOL Programming 1
No new posts DO we have alternate syntax for IFTHEN? Compuware & Other Tools 8
Search our Forums:

Back to Top