As I do not know what your actual screen design looks like I am not sure
if this is a possible solution or not but ...
You can make one subfile look like two subfiles using sflsiz=sflpag.
As an example if you think of the browse/copy function in green screen SEU
where you have one member on the top and a different member on the bottom
and you can page either section, We did this with a single subfile and can
retrieve the cursor position to determine while area the cursor was in and
then page that section.
Another option we use quite often is to use a subfile as a work file. So
where you are using a data structure to roll your fake subfile data, you
could also use a subfile in the program - you don't have to display the
subfile just use it as a work file essentially.
Cheers
Don Brown
From: smith5646midrange@xxxxxxxxx
To: "'RPG programming on IBM i'" <rpg400-l@xxxxxxxxxxxxxxxxxx>
Date: 10/05/2019 07:23 AM
Subject: RE: Trying to position cursor on complicated screen
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>
Because the subfiles were in windows and I did not restrict the cursor to
the windows, it everything was working. You could move the cursor to
either subfile an roll it up or down. Literally, the only think I didn't
have working (that I know of) was the positioning of the cursor.
Sooooo,
I ended up with a similar solution to Booth's. Each subfile had 5 rows so
I created a record with two sections of 5 records (fake subfiles) along
with the other stuff that was the screen in the record and other window.
When the user hits page up or page down, I check to see which "subfile"
then are in and "roll" that section by incrementing the current index of
my data structure and then populating the 5 lines.
And, as I half expected, when they saw the screen, they didn't want to go
to another screen to update the values in the subfile so I had to make
them modifiable on the main screen.
I had really hoped there was an easier solution. Faking a subfile
especially one that is now modifiable is such a pain.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Booth
Martin
Sent: Wednesday, May 8, 2019 4:55 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Trying to position cursor on complicated screen
Part two Should have mentioned this before.
Your description includes two subfiles, which do not lend themselves to a
24x80 data structure solution.
My solution has been to meld them in to one 75-char subfile. Make 2 or 3
75-char datastructures (or however many you need for your various rows)
and feed them as needed into the single subfile.
If you go that route you will want constants for various field effects:
Color Codes
Color Normal Underbar Reverse
Image Underbar & Reverse Image
Nondisplay Blink Blink& Reverse Image Blink&
Underbar
Green
X'20' X'24' X'21' X'25'
White
X'22' X'26' X'23'
X'27'
Red
X'28' X'2C' X'29' X'2D'
X'2F' X'2A' X'2B' X'2E'
Turquoise
X'30' X'34' X'31' X'35'
Pink
X'38' X'3C' X'39' X'3D'
Blue
X'3A' X'3E' X'3B'
X'3F'
Yellow
X'32' X'36' X'33'
X'37'
On 5/8/2019 3:30 PM, Booth Martin wrote:
The issue I have had with this scenario is that only one format can be
active at a time.
--
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.