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



In the display file:
A SFLCSRRRN( &SFL1CSRRRN )
A SFL1CSRRRN 5S 0H TEXT('Return RRN where cursor is +
A located')
A SFL1SCROLL 5S 0H SFLSCROLL
A TEXT('Return RRN at top of current +
A subfile page')
A POSCSRHERE 4S 0H SFLRCDNBR(CURSOR)
A TEXT('Position the cursor at the +
A RRN in this field')

In the RPG program:
Before every EXFMT of the subfile control record, when displaying the
subfile itself, always ensure PosCsrHere > 0:
If PosCsrHere = 0;
PosCsrHere = 1;
Endif;

Exfmt SflCtl1;

If Sfl1CsrRRN > 0; // This could be zero if the cursor is not in
the subfile.
PosCsrHere = Sfl1CsrRRN; // RRN where cursor is located when control
returns to program
Else;

PosCsrHere = Sfl1Scroll; // RRN @ top of subfile when control returns to
program
Endif; // (PosCsrHere could still be modified later by
a validation error)

- Dan

On Fri, May 4, 2018 at 2:14 PM, Dave <dfx1@xxxxxxxxxxxxxx> wrote:

What would be the correct way to manage a subfile that uses this keyword?
You can test the value returned against 0 so that you set the RRRN to 1 in
case the cursor was outside the subfile record fomat.

That's fine if you were on page 1 of the subfile, but what if you aren't?


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.