×
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.
Follow the Page-At-A-Time subfile instead of a Full Load.
If your page is 15 lines, then you load only 15 lines at a time.
SFLSIZ and SFLPAG contain the same value for PAAT subfiles.
A SFLSIZ(15)
A SFLPAG(15)
Then you can have full control over what is shown.
To show the "last" page, we just scroll the SQL cursor to the end and then back up the number of rows needed to load the page.
Also, you can load whatever RRN you want. If you want to start with RRN 15 then load back to 1, then you can do that. Although I wouldn't do it that way.
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Daniel Gross
Sent: Monday, December 13, 2021 3:22 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Display last item of SFL
AFAIK you cannot Position a line at the bottom - it would only work, if the line would be on the bottom, if you were paging from the start.
The subfile position is determined by a record number, but it only guarantees that this record number is displayed on the screen - not exactly where on the screen.
As others suggested - if you need some sort of latest record first, try a descending order - maybe using dynamic SQL, so you only have to change the order clause and reload the subfile - without any further RPG logic involved.
My 2ct
Regards,
Daniel
As an Amazon Associate we earn from qualifying purchases.
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.