× 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.



Hello Gad,

Am 13.12.2021 um 10:13 schrieb Gad Miron <gadmiron@xxxxxxxxx>:

I need to display several screens worth of a SFL and would like to first display
the last SFL screen with the last item at the bottom line of that screen. the user may then Page-Up to see previous items. I've done such things in the (hazy) past but I fail to remember/locate a working PGM/DSPF.

I would appreciate any advice/example

This highly depends on if you want a load-all or a load-paged SFL.

A load-all is easy: Just don't set SFLRCDNBR to 1 after loading all the records.

A load-paged is a bit more work. I'd do a SETGT on the accompanying database file, and do the same number of READP/READPE as you've defined in SFLPAG without anything else. (I prefer to do this on a secondary recfmt in an LF, containing only key fields, to omit reading unnecessary data.) Then start to do READ/READE from there in the "proper" LF's recfmt (with all fields for the DSPF's SFL), and WRITE to the SFL as usual. Don't set SFLRCDNBR to 1 after loading the records.

See examples (without your request for last-record-display) on https://github.com/PoC-dev/as400-sfltemplates-german

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.