× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think the actual number is 131,072.

The buffer is 128K.  1 kilobyte = 1,024 bytes.  1,024 * 128 = 131,072. 

I usually use 128,000 though as it's easier to remember.

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Tony Carolla
Sent: Wednesday, November 30, 2005 1:41 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: RE: Optimizing File I-O in RPG IV/ I-Series


You know, I hate to nit-pick (I have been called a tweeker before), but this
confuses me.  It says in the article that 128k (131072 bytes) is the size of
a single I/O, and you should set the block size to the number of records
that would fit in this size (I wrote a VB to calc it, BTW).  But then it
shows the formula, and uses 128,000 as the number to use in the
calculation.  I know, I know, we are arguing about 1K (1024 bytes), but what
is the right answer?  I usually use 128000, because I am not sure, and I
figure it is better to not spill over (which could be a throwback to my
high-school job in the coffee shop).

So what is the answer, 128000 or 131027?

On 11/30/05, Hewitt, Rory <rory.hewitt@xxxxxx> wrote:
>
> Kurt wrote:
>
> >Nevermind... Just saw Rory's followup email.
>
> Kurt, I should have said that the ODP buffer size on RISC boxes is 128K
> (rather than the 32K used on CISC boxes). OS/400 only uses the first 4K of
> the buffer when it does its default blocking, so they 'waste' 124K of usable
> buffer space on a RISC box...!
>
> Therefore you should use:
>
> OVRDBF...SEQOBLY(*YES blocking-number)
>
> where blocking-number = (131072 / physical-file-record-length) and round
> that down. Of course the IBM article explains it much better than me
> (including the fact that
>
> HTH,
>
> Rory
>

Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.