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
 

 

Define combination of two fields as a key in vsam ksds

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vishalbshah

New User


Joined: 01 Dec 2006
Posts: 61
Location: Pune

PostPosted: Fri Dec 01, 2006 3:41 pm    Post subject: Define combination of two fields as a key in vsam ksds
Reply with quote

[quote]
This is my record structure

01 INTERFACE-RECORD.
05 ACCOUNT-NUMBER PIC X(17).
05 ACCOUNT-TYPE PIC X(03).
05 ICS-TRAN-CODE PIC 9(06).
05 TRANS-AMOUNT PIC 9(08)V99.
05 ICS-SEQUENCE-NUMBER PIC 9(10).

This is a flat file and i want make one vsam with
ACCOUNT-NUMBER and ICS-SEQUENCE-NUMBER as a key how can i write two lengths and two offsets in the KEYS parameter while defining a cluster. [/b]
Back to top
View user's profile Send private message

mallikannasagaram

New User


Joined: 21 Feb 2006
Posts: 9
Location: india

PostPosted: Fri Dec 01, 2006 3:56 pm    Post subject: Re: Define combination of two fields as a key in vsam ksds
Reply with quote

If changing of the record layout is OK then move the required fields together from the first (move ICS-SEQUENCE-NUMBER to the 2 colum in your record layout) and specify key as total length of two fields(27bytes). This fulfills yourrequirement.



Regards,
Mallik
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Dec 01, 2006 4:00 pm    Post subject:
Reply with quote

He's right, no split keys allowed.
Back to top
View user's profile Send private message
vishalbshah

New User


Joined: 01 Dec 2006
Posts: 61
Location: Pune

PostPosted: Fri Dec 01, 2006 5:38 pm    Post subject: Re: Define combination of two fields as a key in vsam ksds
Reply with quote

Hi Malik,

i thought of this way i just wanted to know if any other option is possible so as you are saying no split keys allowed the i left with only one option.
that is same as you suggest

Thanks,
Vishal
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 Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 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