425 pts.
 LoadAll Subfile
For LoadAll subfile, the SFLSIZ is limited to some 9999* records, how can I display beyond that one? Is it possible to display more number of records over the limited size?

Software/Hardware used:
Iseries
ASKED: December 2, 2009  9:40 AM
UPDATED: December 17, 2009  7:06 PM

Answer Wiki:
You need to understand the concept of a subfile. If you set SFLSIZ at 9999 and filled it before you did the EXFMT, you would have done I/O for 9999 records, plus any other CHAINS that may have been done. If the SFLPAG was 20, what user would page through 500 pages to view data? You wasted a lot of resources. You can read and display the 20 records, then when user uses a page key, you get the next 20. Now you have 40 records in your subfile. so you can page backwards without doing database I/O. When the user does a refresh of the subfile, you start all over. * If you really have a need to page through more that 9999 records, reset the subfile with every page key and the cod for forward and backward processing. ===================================================== As long as the question is about a "LoadAll subfile", the answer will always be "You can't." In other words, if you want to display more than 9999 entries, don't use a "LoadAll subfile". Use a page-at-a-time subfile instead. There is no point in trying to cram 10000 rows into a structure that only allows 9999 when only a single screen is ever going to be shown at a time anyway. Tom
Last Wiki Answer Submitted:  December 2, 2009  9:09 pm  by  CharlieBrowne   32,945 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,945 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

My question would be “Why would you want to?” Do you actually have users that are willing to page through 10,000+ records?

 5,830 pts.

 

You’d be better off doing a SFLSIZ = SFLPAG subfile, where you control all of the positioning and functions in your program. Not as easy as letting the system do it for you, but it’s a lot less resource intensive.

 5,670 pts.

 

The only way to display records beyond 9999 is to do what Splat said – SFLSIZ=SFLPAG. Coding it is not nearly as easy as a load-all subfile because you have to keep track of where you are in the file, you have to code both page-up and page-down, plus it would be nice if you could code in Top, Bottom and position-to to ease the user’s burden.

 1,410 pts.

 

Vatchy, I do all of those. It involves a bit of under-the-cover playing around with non-display subfiles & data queues, but it’s stable and it works.

 5,670 pts.

 

Splay, I didn’t mean to imply that you didn’t and I apologize if it came across that way. I was just offering a general observation.

 1,410 pts.

 

Vatchy, nothing derogatory was inferred and certainly no offense was taken. I was indulging in a bit of crowing. My apologies for making you think I’d taken umbrage.

 5,670 pts.