Midrange News for the IBM i Community


Posted by: deepthi
Subfiles usage
has no ratings.
Published: 31 May 2012
Revised: 23 Jan 2013 - 1670 days ago
Last viewed on: 20 Aug 2017 (2959 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Subfiles usage Published by: deepthi on 31 May 2012 view comments(1)

i know we have 3 different types of subfiles and at our work site we mostly use load all subfile. But can anyone tell me when do we go for each subfile and issues faced in each case.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: Subfiles usage
Posted: 5 years 2 months 22 days 11 hours 25 minutes ago

My personal preference is load-all when you're talking less than a few dozen records.  Typical examples is a list of "codes" to select from.

For most other cases I go with page at a time extending, thus I load a page when the user presses PageDown beyond what is already loaded.  Issues with this is that if there are more than 9999 records and the user holds down the PageDown key the subfile will blow up unless you trap the "more than 9999 records" condition.

Very occassionally I will approach something as a load all, when the user wants a column sort ability, but in those cases I load the data to memory/userspace, and still load 1st page only.  When the user selects a column to sort by, I sort the data in memory, then load page 1 with the new sequence.  Once data is in memory the program flies along - loading data to memory is marginally quicker than throwing it all to the subfile.