exact functionality of SFLSIZ

425 pts.
Tags:
RPG/400
In Load All: Is it possible to display more records beyond SFLSIZ for a subgfile? I thought we can display upto SFLSIZ records, but I amazed to see that its possible I declared SFLSIZ(10) and I'm able to display more than 10 records. Can any one tell what exactly SFLSIZ functions?

Software/Hardware used:
Iseries
ASKED: December 2, 2009  1:54 PM
UPDATED: December 4, 2009  10:00 PM

Answer Wiki

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

See answer to other question you just asked.
http://itknowledgeexchange.techtarget.com/itanswers/loadall-subfile/

========================================================

SFLSIZ() doesn’t have a good meaning without also describing SFLPAG(). It’s kind of like trying to explain what “husband” is without also describing what “wife” is. The meanings need to go together to get a full understanding.

First, SFLSIZ() says how much memory space should be allocated by the system when the display file is opened. Subfiles don’t get built on display screens; they get built in memory by the system in a kind of buffer. Your program passes data to the system with WRITE statements to the subfile. You copy part of that memory to the display when you execute the subfile control format. I suppose you would want SFLSIZ() = SFLPAG() * n where n is the number of “pages” that you normally would expect a user to use.

The amount of memory that gets copied to the display is controlled by SFLPAG(). That says how many subfile records can fit on a single ‘page’ of the display in the area that you set aside for it.

The two values are related. You can have the two values be equal or unequal.

If the values are equal, then the system doesn’t handle scrolling through the subfile. Instead, control is returned to your program whenever PageUp or PageDown is pressed. Your program decides what to do with the subfile at that time.

If the values are unequal and SFLSIZ() < SFLPAG(), to tell the truth, I don’t really know what happens. I’ve never seen any point in trying it.

If the values are unequal and SFLSIZ() > SFLPAG(), then the system handles scrolling with PageUp/PageDown until the user attempts to scroll past the last record you wrote to the subfile. If that happens, control is returned to your program. Your program decides what to do with the subfile.

Usually, programmers have the program write more records to the subfile so the user can scroll down more. The subfile can expand to hold more records as long as the number of records doesn’t exceed 9999. (That’s maybe 500 screens to scroll through.)

If you need more than 9999 subfile records actually in memory, then you shouldn’t be using DDS. Use UIM instead. UIM allows up to 16MB of data in its lists.

Tom

Discuss This Question: 2  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
    Tom That was great, I think you did his homework for the next year. Phil
    48,575 pointsBadges:
    report
  • Teandy
    Get a copy of a book by Kevin Vandever called "Subfiles in RPG IV". Most of your questions can be answered there.
    5,860 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