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
 
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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