|
Hmmm... I think you quoted the wrong section of my reply, because Block(*YES) on the F-spec says to use read blocking, not specify a DS that the file is read into... As far as I know, specifying BLOCK(*YES) on the F-Spec overrides the decision criteria the compiler uses to determine whether or not to read ahead in the file when an input operation is executed. I don't know the exact criteria, but I believe that if you only do READs, and no READEs, CHAINs, etc, then blocking is done by default, without the BLOCK keyword. I always specify BLOCK(*YES) or BLOCK(*NO), but that's probably a 'control freak' issue I have. But in addition to doing this, I also specify the overridden block size (number of records read), because I sometimes want to read more than the default. I believe the default # of records is 4k-worth of records, whereas there is a 128k buffer available for all files using blocking. It might be more if the job runs in batch, not sure. If I build a program that needs to read all, or a large number of records from a file, and If I run this program on a system with plenty of memory, and it is in a pool that has enough of this memory allocated, then it is unlikely that the memory allocated to my program will be 'swapped' to disk often, so I take advantage of the full 128k, and tell the system to 'fill-er up' each read. This minimizes disk I/O transactions, and runs alot faster. I have done extensive benchmarking using this technique, and it works well. And that is why I wish that, in addition to saying Block(*YES), you could say Block(*YES:xxxx), specifying the number of records to read each input operation. On 9/2/05, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote: > > > > Sure! I would love to! As soon as I can specify a DS that the 'primary' > file > > can be READ into by the hidden cycle details. Oh... wait... you can only > > have one primary file, right? <vbg> hehe... no thanks. > > Couldn't you achieve the same thing by specifying BLOCK(*YES) on your > F-spec? > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.