Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we create a VSAM dataset in descending order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we create a VSAM dataset in descending order
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: 1439
Location: Bangalore,India

PostPosted: Fri Mar 21, 2008 12:49 pm    Post subject:
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    Post subject: Reply to: Can we create a VSAM dataset in descending order
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: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 21, 2008 2:10 pm    Post subject:
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    Post subject: Reply to: Can we create a VSAM dataset in descending order
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 20, 2013 11:48 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jun 20, 2013 5:12 pm    Post subject: Reply to: Can we create a VSAM dataset in descending order
Reply with quote

nope this is an <older> on
http://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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jun 20, 2013 6:30 pm    Post subject:
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    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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us