Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
The Redbook VSAM Demystified
is something you could/should read this weekend.
I think you will find the answers to your questions there,
as well as learn the BUF.. parms do not affect VSAM files,
check out the AMP parm.
Joined: 06 Jun 2008 Posts: 8280 Location: Dubuque, Iowa, USA
1. I'm not aware of any external way to tell, although there are some general guidelines. If the job has SUBSYS=BLSR specified, then I would expect it to be using batch LSR; otherwise, since LSR is specific to CICS and some select vendor programs, a batch job won't be using LSR.
2. Default buffering is set during VSAM definition -- the BUFFERSPACE parameter indicates the amount of buffer space allocated by default, and is set to 2 times data CI size plus 1 times index CI size unless overridden. This is grossly inadequate in most cases. DATACLASS may be used to define an extended format VSAM file, but has little role to play in buffer allocation.
3. If the option is there, LSR works better with random access while NSR is best for sequential access. Random access requires more index buffers than data buffers since you're using the index values to retrieve the record, while sequential access requires plenty of data buffers and not many index buffers -- one to be precise.
4. Program access is the guiding factor -- random versus sequential versus mixed (AKA skip sequential). Allocate plenty of index buffers in the first case, plenty of data buffers in the second case, and plenty of both in the third case. If your site has BLSR installed, you can use it but otherwise your basically limited to AMP=(BUFND=, BUFNI=) to control buffers.
All this and much more is explained in VSAM Demystified -- you need to start reading.