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
 

 

Can I define multiple fields in primary key?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can I define multiple fields in primary key?
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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 05, 2009 11:34 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 11:07 am    Post subject:
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    Post subject: Reply to: Can I define multiple fields in primary key?
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    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 Data replication from multiple Db2 ta... kishpra DB2 2 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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