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

Will multiple opening of a VSAM file affect job performance?


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

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Thu Dec 20, 2012 7:03 pm
Reply with quote

Hi,

I have created a VSAM file with alternate index file. It contains 5 records only and in that first record will be using in all the modules. That file is opening in read mode getting read across few batch cobol program (nearly 20). It using as reference file for each record of other files which is having 10-20 million records. After this changes the usual jobs taking more time to complete.

I have a doubt, if all the programs and each record of other file reading the same record at same time or via alternate index will it affect job performance?

Thanks in advance.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 20, 2012 7:23 pm
Reply with quote

If you have five records on a file, then read them into working-storage and give everything which wants to use it, access to it.

An "alternate-index" on a five-record file? Never heard of that.

Read the file once. Store the data. Store the data in the order of "hits".

Your programs will even then "fly" in comparison to what you have so far.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Dec 20, 2012 7:54 pm
Reply with quote

This may be a question to be answered by your site support group, and may require some testing. In general, only one program can read a given record of a VSAM file at a time (whether accessed by primary key or alternate index key). However, there are a number of exceptions -- such as using LSR pools (in batch or online) -- so the performance impact would be difficult to predict.

For a 5-record file, I agree with Bill -- there is no reason to read this file more than once; change the programs to load the data into memory and access the data from memory. This would have a far greater impact on performance by reducing the access time from milliseconds to read the disk to nanoseconds to read the memory location.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Dec 20, 2012 7:56 pm
Reply with quote

apart the bad design

Quote:
I have a doubt, if all the programs and each record of other file reading the same record at same time or via alternate index will it affect job performance?


seem to imply a concern for concurrent access from many jobs

unless ( from the topic title )
Quote:
Will multiple opening of a VSAM file affect job performance?

within the same program icon_eek.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Dec 20, 2012 8:06 pm
Reply with quote

Enrico, I think you understated that -- it should be
Quote:
apart the SPECTACULARLY BAD design
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 20, 2012 8:25 pm
Reply with quote

Yes, I was going from the title. Re-reading, it looks like "jobs" plural.

Still the same, open, read, store, close. If needed it 20 separate programs (not part the same runtime) do it as a sub-program, which gets the storage area from the main program linked to it.

20m reads of a VSAM file which only has 5 records, will (probably) find data and index in storage all the time, but will still be wasteful as there is a certain amount of work for each to return the data, even from memory.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Fri Jan 18, 2013 6:23 pm
Reply with quote

Utterly pointless having 5 records in a VSAM file!

Could be just an ordinary flat file read into memory once, with no VSAM overhead.
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top