× 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 my old rpgle code samples, I located below.
Hope it helps.
Good luck!


In DDS there is a CSRLOC keyword you specify as part of the subfile control record.
There are also 3 hidden fields. In below example:
- SFTOP1 is the subfile record # at the first row
- @X & @Y is obvious
It helps you to determine the current cursor position:

A R WCTL01 SFLCTL(WSFL01)
A*%%TS SD 19990602 140315 EKINALI REL-V4R2M0 5769-PW1
A SFLSIZ(0023)
A SFLPAG(0022)
A TEXT('Window Subfile Control')
A KEEP
A CSRLOC(@Y @X)
A OVERLAY
A PUTOVR
A OVRDTA
A OVRATR
A N25 SFLDSP
A N25 SFLDSPCTL
A 25 SFLCLR
A SFTOP1 4S 0H SFLRCDNBR
A @X 3S 0H
A @Y 3S 0H

Here is the RPGLE end:

* Display File
FDSPSU2DF$ CF E WORKSTN
F SFILE(WSFL01:REC1)
F SFILE(WSFL02:REC2)
F INFDS(DS1)
...

D DS1 DS
D #LOC 370 371B 0
D #SFTOP 378 379B 0

//Load subfile
.....

// display subfile
C DSP1 TAG
C WRITE WFOOT
C WRITE WSHEAD
C @R1 IFGT 0
C EXFMT WCTL01
C ELSE
C EXFMT WNRC01
C END
// determine current cursor location
C Z-ADD #SFTOP SFTOP1
C #LOC DIV 256 #Y 3 0
C MVR #X 3 0
C Z-ADD #Y @Y
C Z-ADD #X @X


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Vern Hamberg via MIDRANGE-L
Sent: Monday, April 17, 2023 10:02 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
Subject: Re: Load-All SFL: Cursor positioning

Sent by an external sender. Please be cautious about clicking on links and opening attachments.
----------------------------------------------------------------------------------------------------------------

Patrik

I dug around a little - here's something that might help - in this link
- https://www.go4as400.com/Load-all-subfile-example-RPGLE/SFL-2.aspx?cid=42

In load-All subfile if we do PAGEDOWN and then press ENTER on the
page, by-default ENTER bring the display screen to the very first
page irrespective of the current page number. To avoid this
situation, we use file information data structure to get the current
page RRN number and pass it to the SFLRCDNBR hidden field defined in
the display file DDS.


SFLRCDNBR also has a 2nd parameter, the word *TOP, I believe - then the record number you put in SFLRCDNBR will be at the top of the subfile page.

I think this will work - I don't know how long *TOP has been available.

Cheers
Vern

On 4/17/2023 4:26 PM, Patrik Schindler wrote:
Hello Rob,

Am 17.04.2023 um 21:56 schrieb Rob Berendt<robertowenberendt@xxxxxxxxx>:

Ask yourself this, what row would you expect to be positioned to on a load-all subfile done with RLA instead of SQL?
I don't recognize the term "RLA".

I think it just makes it clearer that once you pass it off to a load-all the positioning is out of your hands.
That's what I want to find out.

Comparing e. g. with the wrkmbrpdm display, scrolling makes the cursor appear in the first SFL line after each scroll, even if you position the cursor in another line. Not sure if this is a load-all, though.

:wq! PoC

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



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.