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.
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.
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.