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

sort input seq file before looking up in VSAM


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

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed Jun 02, 2010 7:22 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jun 02, 2010 7:30 pm
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
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: 206
Location: Bangalore

PostPosted: Mon Jun 07, 2010 7:02 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top