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

Can we create a VSAM dataset in descending order


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

New User


Joined: 20 Mar 2008
Posts: 3
Location: Mumbai

PostPosted: Fri Mar 21, 2008 9:58 am
Reply with 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.

First thing, is this possible? if yes, what should be the parameter to be included in the DEFINE CLUSTER statement.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Mar 21, 2008 12:49 pm
Reply with quote

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
View user's profile Send private message
Ibrahim Ronaque

New User


Joined: 20 Mar 2008
Posts: 3
Location: Mumbai

PostPosted: Fri Mar 21, 2008 1:36 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 21, 2008 2:10 pm
Reply with quote

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
View user's profile Send private message
Yellapu Sreenivasulu

New User


Joined: 20 Jun 2013
Posts: 1
Location: India

PostPosted: Thu Jun 20, 2013 11:29 am
Reply with quote

You can do this by converting the key into its 9's compliment. Then it will be stored in descending order.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 20, 2013 11:48 am
Reply with quote

Why are you posting on a topic which has been dormant for 5.25 years

Enrico - Is this a new record ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 20, 2013 5:12 pm
Reply with quote

nope this is an <older> on
ibmmainframes.com/viewtopic.php?t=2533&highlight=resurrected

the record is around 80 months
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 20, 2013 6:30 pm
Reply with quote

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
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top