As I said in the original email, CSRLOC positions within the window, not the
screen. Normal records work as you are saying but windows do not.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Tyler,
Matt
Sent: Wednesday, May 8, 2019 1:44 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Trying to position cursor on complicated screen
Use these on each record format.
A RTNCSRLOC(*WINDOW &CSRROW2
&CSRCOL2
A &CSRROW &CSRCOL)
A 73 CSRLOC(ROWPOS COLPOS)
A ROWPOS 3S 0H
A COLPOS 3S 0H
A CSRROW2 3S 0H
A CSRCOL2 3S 0H
This gets the position of the cursor within the bounds of the window and
then the entire screen.
-Matt
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of
smith5646midrange@xxxxxxxxx
Sent: Wednesday, May 8, 2019 11:39 AM
To: 'RPG programming on the IBM i (AS/400 and iSeries)'
<rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Trying to position cursor on complicated screen
I have a very complicated screen and I am having problems positioning the
cursor. There are no modifiable fields. It is display only and function
keys allow for editing via a different screen
Here is a brief layout.
Record1 - lines 1 - 4
Window subfile1 - lines 5 - 12
Window - lines 13 - 17
Window subfile2 - lines 18 - 25
Subfile - lines 26-27 (contains system error messages)
All of the records are OVERLAY without erasing.
I write the records in this order
Subfile
Record1
Window subfile1
Window
Window subfile2
Any other sequence seems to wipe out one or more of the previously written
records.
Because the window subfile 2 is the last record written (exfmt) , all of
the records written are displayed correctly but the cursor positions to the
first subfile record inside of it which looks strange. I would like to
position it to the top left or right corner, I don't care which. I tried
using CURSOR but it positions within the window, not the entire screen.
If I could write record1 last, I could solve the problem but that seems to
clear the records below it. Is there something that I might have wrong on
that record causing it to erase the window records?
Is there something else that I am missing? I really don't want to have to
create fake subfiles (2 sets of fields) and programmatically make it look
like the fields are rolling with the page up / page down.
--
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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mail
man_listinfo_rpg400-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDD
Gs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=XZS0WJKlyGQoRAbRgPPnXgQVg
CssJyaT0wM315zspJU&s=idQ7FC3br6OGKxuPcZEDYpZRJ3DwWVimw-1s1GvEL0k&e=
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rp
g400-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8
HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=XZS0WJKlyGQoRAbRgPPnXgQVgCssJyaT0wM315zs
pJU&s=TVMuJYSxQICXmeIHsw1Vr34n3FK4jzCCQA8SHKnV4oU&e= .
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=D
wICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz
7qvL2YDU_M-VhnRH6r43I&m=XZS0WJKlyGQoRAbRgPPnXgQVgCssJyaT0wM315zspJU&s=uX33Rr
e6rGvOVuQH6ddP5mYK-18C3Z1L97qHRheqXdo&e=
--
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@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.