View previous topic :: View next topic
|
Author |
Message |
Ibrahim Ronaque
New User
Joined: 20 Mar 2008 Posts: 3 Location: Mumbai
|
|
|
|
I have a requirement wherein i want to create a new VSAM dataset which during creation should have an descending order sequence. Ideally, the dataset will always be in ascending order.
First thing, is this possible? if yes, what should be the parameter to be included in the DEFINE CLUSTER statement. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Ibrahim,
Quote: |
I have a requirement wherein i want to create a new VSAM dataset which during creation should have an descending order sequence. Ideally, the dataset will always be in ascending order. |
Your req is not clear. Explain bit clearly. |
|
Back to top |
|
|
Ibrahim Ronaque
New User
Joined: 20 Mar 2008 Posts: 3 Location: Mumbai
|
|
|
|
hi,
We would create the VSAM dataset using IDCAMS DEFINE CLUSTER command. When the file will be created, it is assumed that the file is created is in ascending order. so when the records are added, it would be be sorted in an ascending order sequence by default.
But is there any possibility where i can say VSAM that the file created should be in descending order and when the record are added , it should be sorted internally in descending order and get stored.
It would be possible using backward/forward logic in COBOL, but can we do it in VSAM itself.
I hope i am clear with my query. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
No is the answer. To load a VSAM KSDS the records must be in key sequence else the job fails, unless you are using a spedific program to insert records one by one which would seem to me to be real waste of resource.
Just sort the records into key sequence and REPRO them in. |
|
Back to top |
|
|
Yellapu Sreenivasulu
New User
Joined: 20 Jun 2013 Posts: 1 Location: India
|
|
|
|
You can do this by converting the key into its 9's compliment. Then it will be stored in descending order. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why are you posting on a topic which has been dormant for 5.25 years
Enrico - Is this a new record ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Yellapu Sreenivasulu: nowhere was it stated that the key of the VSAM file is only display numeric values. If the key starts with a binary field, followed by an alphanumeric field with letters, what would be the 9's complement of those fields?
When you respond on a forum such as this one, you need to consider all ramifications of the issue not just the stated problem. |
|
Back to top |
|
|
|