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

How to create VSAM file with multiple keys


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

New User


Joined: 04 Sep 2007
Posts: 16
Location: Bangalore

PostPosted: Thu Mar 27, 2008 7:52 pm
Reply with quote

Hi,

I have a file with the following layout.
01 File.
05 WS-A PIC X(05).
05 FILLER PIC X(25).
05 WS-B PIC X(10).

Is it possible to define a VSAM KSDS cluster using WS-A and WS-B as the keys. If yes please give me the syntax.

Thanks in advance,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 27, 2008 7:56 pm
Reply with quote

No!

for a vsam KSDS or AIX the key must be a contiguous number of chars

read the manual
( link at top of the page, scroll down, the manual is VSAM services )
Back to top
View user's profile Send private message
subinraj

New User


Joined: 04 Sep 2007
Posts: 16
Location: Bangalore

PostPosted: Thu Mar 27, 2008 8:14 pm
Reply with quote

Thanks for the quick response
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: Thu Mar 27, 2008 9:48 pm
Reply with quote

Hello,

Do you want one key of both field a and field b or do you want a primary key of field a and an alternate key of field b?

As Enrico said, you cannot do the first.

If you wanted 2 keys with one field each, you could do that. . .
Back to top
View user's profile Send private message
subinraj

New User


Joined: 04 Sep 2007
Posts: 16
Location: Bangalore

PostPosted: Fri Mar 28, 2008 9:28 am
Reply with quote

hello,

I wanted was the primary key using both WS-A and WS-B which is not possible as you said.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top