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

Can I define multiple fields in primary key?


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

New User


Joined: 23 Mar 2007
Posts: 9
Location: USA

PostPosted: Wed Aug 05, 2009 9:29 pm
Reply with quote

The VSAM file layout is mentiond below.

table number
emp id
address
SSN

I want the table number, emp id and SSN should be as part of my primary key. How I have to write my vsam define statement? Is it possible in VSAM?
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: Wed Aug 05, 2009 11:34 pm
Reply with quote

Hello,

Yes. . . It is possible.

However, they must all be contiguous. Usually, they would be placed at the front of the record layout.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 11:07 am
Reply with quote

So at a guess, you will need to reformat your file so that the fields that constitute the key are all contiguous.
Back to top
View user's profile Send private message
cvasu03

New User


Joined: 23 Mar 2007
Posts: 9
Location: USA

PostPosted: Thu Aug 06, 2009 9:52 pm
Reply with quote

Thank you
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
Search our Forums:

Back to Top