View previous topic :: View next topic |
Author |
Message |
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Mon Jul 19, 2004 3:24 am Post subject: How to make key in dataset unique? |
|
|
I have a dataset and I want to make one of its vloume as key, how can I remove duplicate key? _________________ cheers,
Andy |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Jul 19, 2004 4:06 am Post subject: |
|
|
Andy,
This is the weird requirement I ever heard.
1. What has the VOLUME got to do with key? what exactly is your requirement?
btw if you are not aware of volume parameter, then here is a small explanation of volume parameter.
Code: |
The VOLUME parameter identifies the volume serial number of the volume on which a data set resides. You can use the VOLUME parameter to request a particular volume, volume retention for usage in a subsequent job step, or to name multiple volumes.
|
2. A sequential dataset does not have a key. You can define keys in a vsam cluster
3.And regarding removal of duplicate key, you can find numerous examples of it in the utilities forum.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
NutCracker Beginner
Joined: 13 Dec 2002 Posts: 45 Topics: 3 Location: 3rd Block from the SUN
|
Posted: Tue Jul 20, 2004 1:22 am Post subject: |
|
|
Quote: |
<snip> have a dataset and I want to make one of its vloume as key <snip>
|
Is 'Volume' one of the columns contents in the dataset |
|
Back to top |
|
|
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Tue Jul 20, 2004 5:26 am Post subject: |
|
|
what I mention here 'volume' is a field of table, sequential dataset does not have key. But if I need transfer its data to a VSAM file or DB2 table, I will treat it a key dataset. _________________ cheers,
Andy |
|
Back to top |
|
|
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Tue Jul 20, 2004 7:56 am Post subject: |
|
|
1.sort the sequential file based on the key.
sort fields=(1,12,ch,a) --> 1 to 12 bytes is key
sum fields=none --> removes duplicates if any based on the key.
2.Use IDCAMS REPRO to copy the sorted file to the vsam. |
|
Back to top |
|
|
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Sat Jul 24, 2004 6:10 am Post subject: |
|
|
Dear vijiay:
Thank you. It worked. _________________ cheers,
Andy |
|
Back to top |
|
|
|
|