See answer to other question you just asked.
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.