If you issue a BSAM READ followed by a WAIT, and then deblock the buffer before 
doing the next READ, the system builds a channel program to read just the one 
block.
If on the other hand you issue 10 READ commands in a loop, each READ having its 
own DECB, the system will build a channel program to read the first block and 
then because the other 9 commands are presented before the first has finished, 
it will build a chained channel program to read the 9 in one physical I/O 
operation.  Now there is a fair amount of overhead for each I/O, and the time 
for each block is much less than that, so you wind up reading a lot faster.
You can build a very efficient BSAM process, but it is not for the faint of 
heart.
As I said, QSAM with a reasonably large BUFNO, like 20 or more, will get you 90 
to 95% of the way.

Chris Blaicher
Technical Architect
Mainframe Development
Syncsort Incorporated 
2 Blue Hill Plaza #1563, Pearl River, NY 10965

P: 201-930-8234  |  M: 512-627-3803    
E: [email protected]

www.syncsort.com

CONNECTING BIG IRON TO BIG DATA


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Joseph Reichman
Sent: Friday, February 3, 2017 2:27 PM
To: [email protected]
Subject: Re: BSAM vs QSAM

I have huge VB files 

Don't really understand what you mean by 

Deblock after doing a READ then WAIT

Where an entire block is read subsequent READs Just point to the next record 

> On Feb 3, 2017, at 2:22 PM, Blaicher, Christopher Y. <[email protected]> 
> wrote:
> 
> There can be if you code for just what you expect.
> 
> QSAM does multi-buffer I/O for you, with BSAM you have to issue multiple 
> WRITE or REAAD commands and do a WAIT, not to mention having to block or 
> de-block the buffer, which can be a real pain for VBS files.
> 
> It really depends on how much you are processing and how often you are doing 
> it to determine if the amount of time you are going to spend on developing it 
> makes it worth it.
> 
> Using QSAM with GET LOCATE (as long as you aren't processing VBS files) and a 
> reasonable BUFNO of 10 or more is going to get you close to most BSAM 
> applications.  GET or PUT with the MOVE option is the easiest to code for.
> 
> Chris Blaicher
> Technical Architect
> Mainframe Development
> Syncsort Incorporated
> 2 Blue Hill Plaza #1563, Pearl River, NY 10965
> 
> P: 201-930-8234  |  M: 512-627-3803
> E: [email protected]
> 
> www.syncsort.com
> 
> CONNECTING BIG IRON TO BIG DATA
> 
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] 
> On Behalf Of Joseph Reichman
> Sent: Friday, February 3, 2017 1:51 PM
> To: [email protected]
> Subject: BSAM vs QSAM
> 
> Hi
> 
> BSAM is a bit more complex than QSAM
> 
> Is there any performance improvement
> 
> Thanks
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
> 
> ________________________________
> 
> 
> 
> ATTENTION: -----
> 
> The information contained in this message (including any files transmitted 
> with this message) may contain proprietary, trade secret or other 
> confidential and/or legally privileged information. Any pricing information 
> contained in this message or in any files transmitted with this message is 
> always confidential and cannot be shared with any third parties without prior 
> written approval from Syncsort. This message is intended to be read only by 
> the individual or entity to whom it is addressed or by their designee. If the 
> reader of this message is not the intended recipient, you are on notice that 
> any use, disclosure, copying or distribution of this message, in any form, is 
> strictly prohibited. If you have received this message in error, please 
> immediately notify the sender and/or Syncsort and destroy all copies of this 
> message in your possession, custody or control.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to