Expanding subfiles

pts.
Tags:
RPG
The subfile size in expanding subfile is said to be one greater than the subfile page. Is it a standard? Can we have a subfile with SFLSIZ say 100 and SFLPAG 5 and still call it an expanding subfile.. Please explain.

Answer Wiki

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

The answer to your question is yes. Anytime the SFLSIZ value is greater than the SFLPAG value, it is considered an “expanding subfile”. Therefore there is really no good reason to make the SFLSIZ value more than (SFLPAG + 1). However, as I think again about it, there may be some memory allocation rules that apply but that is beyond the scope of your question.

Hope this helps.

Discuss This Question: 3  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
  • BigKat
    If you knew there were always going to be 100 subfile entries, setting the sflsiz to 100 with sflpag at 5 would say you a tiny (insignificant) amount of time because the system would allocate enough memory at startup and would not need to "go back to the well" for more.
    8,210 pointsBadges:
    report
  • ITAddict
    Setting the Sufile size one greater than sufile page is the only way to have an unlimited subfile size. If you set the subfile size to 100 and page to 5, you are limited to 100 entries in the subfile at one time. A typical implementation would be to load the entire subfile and let the system control page up or down. If you are unsure of the number of rows you will be loading, use the expanding subfile. You load the subfile one page at a time and let the system control pagedown. If Subfile size and page are the same, your program controls loading pages, pageup and pagedown.
    875 pointsBadges:
    report
  • BikerDude
    For performance sake you should set the SFLSIZ value according to the number of records you would normally load into the subfile. However, regardless of what you set SFLSIZ at (as long as it's greater than the value of SFLPAG) the subfile is automatically extended when you try to add a record with a relative record number greater than SFLSIZ. See text below from the manual. When you specify different parameter values for SFLPAG keyword and SFLSIZ, the SFLSIZ value specifies the number of records that can be placed into the subfile. If your program places a record with a relative record number larger than the SFLSIZ value into the subfile, the subfile is automatically extended to contain it (up to a maximum of 9999 records). The parameter value you specify should be large enough to accommodate the maximum number of records you would normally have in the subfile.
    0 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