LoadAll Subfile

425 pts.
Tags:
AS/400 - DDS
AS/400 Subfiles
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Teandy
    My question would be "Why would you want to?" Do you actually have users that are willing to page through 10,000+ records?
    5,860 pointsBadges:
    report
  • Splat
    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.
    6,795 pointsBadges:
    report
  • Vatchy
    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 pointsBadges:
    report
  • Splat
    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.
    6,795 pointsBadges:
    report
  • Vatchy
    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 pointsBadges:
    report
  • Splat
    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.
    6,795 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following