Subfile load all & expandable

145 pts.
Tags:
AS/400
AS/400 Subfiles
DDS
RPGLE
Subfile
Hi , i have some confusion beween load all & expandable subfile, for example in case of load all Pf has 100 records sfksiz=20 and sflpag =10   but if i am writing more then 20 records , but it should allow only 20 records in load all subfile because sflsiz=20 but its allowing to write more tehn 20 records some one can tell me what excatly the difference between Load all & expandable subfile. Thanks

Software/Hardware used:
as400

Answer Wiki

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

There is a difference between Load all and Expandable subfile while writing the records to Subfile.

Incase of <b>Load all</b> subfile, All the records will be read from PF and will write into Subfile.
Eg. If we have 100 Records in PF and we are displaying 10 Records in Subfile at a time.
All 100 records will get written to subfile at once.

Incase of <b>Expandable</b> Subfile, The records which we are displaying on the screen will get written into subfile.
If we consider above exapmle, For the first time We display Subfile only 10 records will get written, and if we use PAGEDOWN keyword, the next 10 records will get written into Subfile before display.

Pradeep.

Discuss This Question: 7  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
  • philpl1jb
    sflsiz=20 and sflpag =10 Program will display 10 rows per page (SFLPAG) and will grab blocks of memory as needed in blocks of 20. When the sflsiz is not equal to the sflpag the system will continue to grab blocks of memory as needed until it reaches 9999 rows- then it will crash. Phil These settings would work for either the Load All or the expanding program logic. Phil
    51,365 pointsBadges:
    report
  • TomLiotta
    but it should allow only 20 records in load all subfile because sflsiz=20 That isn't true. SFLSIZ=20 does not limit the number of records to 20. It only says that space for 20 records will be allocated when the subfile is created. Additional records can be added if you write more records to the subfile. SFLSIZ is an allocation value, not a limit. However, if SFLSIZ is combined with SFLPAG and the two values are equal, then the subfile will not be expanded and SFLSIZ is effectively a limit. Tom
    125,585 pointsBadges:
    report
  • Rpgle400tech
    but it should allow only 20 records in load all subfile because sflsiz=20 That isn’t true. SFLSIZ=20 does not limit the number of records to 20. It only says that space for 20 records will be allocated when the subfile is created. Additional records can be added if you write more records to the subfile. SFLSIZ is an allocation value, not a limit. However, if SFLSIZ is combined with SFLPAG and the two values are equal, then the subfile will not be expanded and SFLSIZ is effectively a limit. Tom ************************************** Ok ,So that means .. SFLSIZ doesn't restrict Load all & expandable subfile size. and it does not show the maximum no of records allowed in subfile.?
    145 pointsBadges:
    report
  • TomLiotta
    ...it does not show the maximum no of records allowed in subfile.? That is correct. There are two general circumstances -- either SFLSIZ=SFLPAG or SFLSIZ<>SFLPAG. When they are equal, the system handles it as a "page at a time" subfile, and SFLSIZ does show the maximum; but so does SFLPAG. When they're not equal, it can be either a "load-all" or an "expanding" subfile depending on how you code your program. For either a load-all or expanding subfile, maximum records is always 9999. In general, you should never design a subfile process to load more than a couple hundred records. No user should have to scroll through 9999 records. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Your program needs to know how many rows are written. It computes and assigns the RRN as it writes each record to the subfile. The max your program should allow is rrn 9999. But as Tom pointed out that's a lot of pagedowns for the user. For situations where there will be more than a few pages of data your design should include some locate fields for the user to request data starting at a specific value and the logic to support that.. Phil
    51,365 pointsBadges:
    report
  • Rpgle400tech
    Thank you so much to all of you.. Now the concept of sflsiz is clear. If sflsiz<> sflpag than it can be either load all or expandable subfile . so is there any particular difference between them , so that it can be distinguish that weather it is Load all or expandable subfile,(because sflsiz=sflpag+1 for expandable subfile does not make any sense here )
    145 pointsBadges:
    report
  • philpl1jb
    Although page-at-a-time is the only logic that can use sflsiz = sflpag, page-at-a-time would work with sflsiz <> sflpag. Although the only way to tell which load type is used is to inspect the RPG or COBOL code, I would expect that : - a Load All subfile control record would not contain a pageDown (RollUp) keyword - an expanding subfile would contain a pageDown (RollUp) keyword - a page-at-a-time subfile would contain both a pageDown and pageUp (Rollup and Rolldown) keyword. The Load all the simplest logic to program. The Page-at-a-time is the hardest logic to program. Phil
    51,365 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