20 pts.
 how to control subfile end
my subfile size is 500, SFLPAG is 10. but actual record to display is only 30. How to ignore *More and display Bottom after reach 30th record. Currently it display *More in empty pages

Software/Hardware used:
RPG
ASKED: April 2, 2010  7:20 AM
UPDATED: April 5, 2010  7:13 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The best way to do that is to set subfile size 1 greater than subfile page and then just load all of your records to the subfile before displaying it. When you’re only talking 30 records then that is the best way to do it. It sounds like you are using SFLINZ and then chain/update; the SFLINZ will write all 500 records to the subfile and then use chain/update to write the 30 actual records.

 1,410 pts.

 

It sounds like you might be using SFLINZ to cause blank records to be included in your subfile. There shouldn’t be any empty pages to display. If you don’t create them, they won’t be there.

It doesn’t really matter if you set SFLSIZ() to 500 or to the (size of a page + 1). The system only cares if the size is greater than what fits on a page. Ideally, you should set SFLSIZ() to the size that will fit perhaps 90% of its uses. But if it is expected to exceed the size of a page at any time, then it should be at least one greater than subfile page size. Setting the size to something that you expect allows the system to allocate appropriate memory when the subfile is first opened. Additional memory extensions are then minimized. (Subfiles are built in memory.)

Tom

 108,055 pts.

 

thank you very much vatchy & TomLiotta, the problem has been solved now. Its because of the SFLINZ.

 20 pts.

 

Generally, you would use SFLINZ to create an empty subfile. This could be a subfile that you want the user to enter records into. It can provide a method of data entry where the user types a group of records and your program processes the records as a group or a ‘batch’.

I haven’t run across other uses for it, but maybe someone else can describe others.

Tom

 108,055 pts.