Cumulative RDW's+4 (first beginners error).

Kees.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Reichman Joseph
Sent: 19 July, 2016 16:33
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Bsam VS Qsam for VB records

As Far as I can see all the I/O we do here is qsam  There was an issue here as 
Jay Campbell pointed out where writing a VB record had a valid RDW but the BDW 
was zeros. Using qsam I would have no idea what the BDW was as the system takes 
care

of that. I am assuming if you use BSAM you decide the number of records that 
make up a block and each record is proceeded by a RDW and the block which you 
write has cumulative BDW.

Am I on the right track ?   

Joe Reichman
Joe Reichman
 
IT Specialist
Master Files Division
New Carrollton Federal Building, B7-182
OS:CTO:AD:CP:I:IB
Flex M,T,Th,F
Home office (240) 863 - 3965 
Office (240) 613-4350
Cell     (917) 748-9693
TOD M - F  7:30 am  - 4:00 pm

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@listserv.ua.edu] On Behalf 
Of John McKown
Sent: Tuesday, July 19, 2016 10:24 AM
To: IBM-MAIN@listserv.ua.edu
Subject: Re: Bsam VS Qsam for VB records

On Tue, Jul 19, 2016 at 9:02 AM, Reichman Joseph <joseph.reich...@irs.gov>
wrote:

> Hi,
>
> Would anyone know the plus and or minus for using BSAM as opposed to 
> QSAM for VB records. It seems with BSAM there is more control e.g. 
> specifying the BDW as well as the RDW. Wondering about performance.
>
> I am guessing if you know what you are doing BSAM would be faster. If 
> anyone could point me to examples using BSAM would appreciated. As I 
> have mainly used QSAM specifying the RDW
>
> Thanks
>
> Joe Reichman
>

​In general (VB or FB), QSAM is much easier to program. The access method just 
hands you individual records. But you pay for this in that you cannot do I/O 
overlap yourself. With BSAM, you do a READ. But the _block_ is not available to 
you (for certain sure) until you do a CHECK. But this allows you to test the 
I/O ECB and "do something else" if it has not been POST'd yet. A type of 
"useful polling" loop. Also, if you are reading multiple files, you can do a 
ECBLIST and wait for any one of the I/Os to complete instead of doing the I/O 
serially. Again performance. The problem is that _your code_ must de-block the 
​ individual records. For VB, you should probably determine the number of byte 
read in the block (they aren't necessarily all the same size, you
know) and check that the value in the BDW agrees with this number. And the code 
to do this is non-obvious because what you end up doing is knowing how many 
bytes you asked for and the I/O control block tells you the residual byte count 
- not the byte read but more like "you asked to read some bytes and there were 
​ were not enough in the block - the block was short by ? bytes). So the number 
of bytes read is the number of bytes you requested in the READ (not given back 
to you - you must remember) minus the "residual byte" count which is returned.

IOW - unless you are very clever and you have a real need for I/O overlap 
performance, and you don't mind the maintenance programmer cussing you out, 
then I'd just go with QSAM.

--
"Worry was nothing more than paying interest on a loan that a man may never 
borrow"

From: "Quest for the White Wind" by Alan Black

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
********************************************************
For information, services and offers, please visit our web site: 
http://www.klm.com. This e-mail and any attachment may contain confidential and 
privileged material intended for the addressee only. If you are not the 
addressee, you are notified that no part of the e-mail or any attachment may be 
disclosed, copied or distributed, and that any other action related to this 
e-mail or attachment is strictly prohibited, and may be unlawful. If you have 
received this e-mail by error, please notify the sender immediately by return 
e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
employees shall not be liable for the incorrect or incomplete transmission of 
this e-mail or any attachments, nor responsible for any delay in receipt. 
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
Airlines) is registered in Amstelveen, The Netherlands, with registered number 
33014286
********************************************************
                        


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to