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
 

 

sort input seq file before looking up in VSAM

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

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Wed Jun 02, 2010 7:22 pm    Post subject: sort input seq file before looking up in VSAM
Reply with quote

I have a vsam file having key in first 9 digits and It stores about 300k records.

Also i have an input file PS file which contains the 9 digit key in its records and stores around the same no of records.

The program opens the VSAM file in I-O mode (access mode is dynamic).

The PS file is read sequentially and for each record in it, it takes 9 digit key and does a random read on the vsam file.If it find it in the vsam file, it updates a field in vsam, else it reads next record from ps file.

Now my question is, would it improve any performance, if I sort my PS file in the order of the 9 digit key.

Thanks
Ajay
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: Wed Jun 02, 2010 7:30 pm    Post subject:
Reply with quote

Probably yes, as the access although randon will be in a sequential pattern. This may avoid the same index buffers being loaded, cleared and reloaded many times. Obviously depending on the way in which the keys in the PS file are distributed.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 02, 2010 7:57 pm    Post subject:
Reply with quote

why not skip sequential for the vsam?

as well as sorted ps file?
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Mon Jun 07, 2010 7:02 pm    Post subject: Reply to: sort input seq file before looking up in VSAM
Reply with quote

Quote:
Probably yes, as the access although randon will be in a sequential pattern. This may avoid the same index buffers being loaded, cleared and reloaded many times. Obviously depending on the way in which the keys in the PS file are distributed.


Well, i tested it with 5 million records in the PS file, and 2M records in Vsam file. While with the sorted ps file the job finished in 15 minutes, whereas it took 2 hours when the input was not sorted.

Thanks Expat and dbzTHEdinosauer.

-Ajay
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us