× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Concur with Charles: IF I have understood correctly, the table has only 15 rows; I would load the lot and let the system handle paging up/down. Set SFLSIZ = 13, SFLPAG = 12.

(By setting SFLSIZ=SFLPAG=12 the program is having to refresh the subfile on each page up/down because it does not expand. Not helpful UNLESS the underlying table is subject to continual change.)

Brian.

On 17/04/2023 16:16, Jason Olson wrote:
No they are not both 12. Subfile size is 12 and subfile page is 4.

I'm using SQL to fetch the records to feed to the subfile. So I only fetch 12 at a time. If there is less I load less.


J


On 4/17/23 10:05, Charles Wilt wrote:
What do you have in the DDS for SFLSIZ and SFLPAG?

Sounds like they both are 12...in which case you've got a page-at-a-time
subfile.

You probably want SFLPAG(12) and SFLSIZ of at least 13 to give you an
expanding subfile..

Or just do SFLSIZ large enough, say 24, to give you enough room to load all
the records...

Charles

On Mon, Apr 17, 2023 at 8:33 AM Jason Olson <josys36@xxxxxxxxx> wrote:

I have a question about subfile drop and fold. This may have been
something I solved years ago, but I can't remember.

I have a table with 15 records in it. The subfile is designed to hold
12. When the subfile is displayed I have a function key to drop or fold
the subfile records, and when folded you see 4 records. Nothing out of
the ordinary.

The issue comes in when you use page up or page down. When the subfile
is folded and you page down, you see the next set of folded records. If
you page up you see the top of the file again. If you page down twice
and page up, you see the correct records again. However, if you page
down all the way to the bottom and then page up, control is being
returned to the program, and then the subfile is being reloaded. This
then puts the subfile at the top of the display. If you don't page down
to the bottom and page up, it's showing the correct records and not
returning control back to the program

Why is it returning control back to the program when you page up and are
at the bottom of the subfile? I was just thinking I could put code in to
not reload if the subfile is folded, but I don't remember this happening
to me in the past. Subfiles are not my favorite LOL.


Jason

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.