I have a VSAM file reading the record by RANDOM read. The below are the values from the LISTCAT. After introducing this VSAM file in the processing, the Job is started runnning for 3 hours, which was completed in 5 to 10 mins earlier.
The VSAM file has only 500 records in it. I tried having AMP='BUFNI=20' but didnt reduce the run time. What would be the optimum Buffer value I could add to improve the performace of the Job ? Many thanks.
Total Index Records HURBA CISIZE CIs per CA
1 691200 5,120 135
How many times is the file accessed in each run? It may be more efficient to load it to a COBOL table. Another way to improve efficiency is to check to see if the key being used to access the file is the same as for the previous access in which case you do not need to access it again as the data would be current in your program.
Your EXCP counts for data and index are surprisingly close. In addition to Nic, is your input file in key order? If not, buffers will be filled, only to be thrown away, as a lower key arrives. More buffer space, more wasted io.
For the size of your file, Nic's Cobol table sounds a good idea. Load it up, occurs depending on, search all, with Nic's check-for-previous-search as well.
Or process in key order, even if you have to re-sequence later.
Or if it has to be like you have it, try making only one buffer.
Joined: 06 Jun 2008 Posts: 8280 Location: Dubuque, Iowa, USA
What would be the optimum Buffer value I could add to improve the performace of the Job ?
Your last post indicates there is 1 index level -- so providing anything more than 2 index buffers will not result in performance improvements, and could degrade performance (the system does have to manage however many buffers you tell it to use). You should add more data buffers, however, since the minimum is usually not enough.
I think the basic problem is you have started with an invalid assumption and are leaping to invalid conclusions thereby. You are assuming -- on no evidence that I can see -- that VSAM buffering is your problem. It is much more likely that you have a program logic problem that is causing the additional elapsed time for your job. For example, if you open the file, read a record, close the file and repeat this over and over -- that alone could add a LOT of time to your run. Of course, there are many other potential problems -- but you should be looking at your code around the VSAM file access, not changing system parameters, to fix the problem.