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



First, you could use F14 to change the fold/unfold in conjunction with
the SFLDROP/SFLFOLD and the SFLMODE keys words.  A little more
programming but it will work.  I use them to keep the fold/unfold
consistent between enter keys.

Second, you would have to, as Matt Tyler suggested, use the INFDS for
the display file to find out where the cursor is, and by calculation,
determine which record it is on. But as I pointed out, it could get a
little hairy is you move the current subfile record to the top of the
subfile area.  If you keep it consistent by not putting *TOP on the
SFLRCDNBR, then it is possible.

Marvin


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Monday, October 24, 2005 2:10 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: subfile SFLFOLD/SFLDROP and cursor positioning

That was my first thought, and is what started me on this learning
experiment.  The problem appears to be that when we use F14 to
fold/unfold,
the program control never returns to the program, so there is no way to
read
or position anything with the program itself.  



On the second question, what calculation are you thinking might give the
page of the subfile that is on the screen?

 

---------------------------------

Booth Martin

http://www.martinvt.com

---------------------------------

-------Original Message-------

 

From: RPG programming on the AS400 / iSeries

Date: 10/24/05 15:58:24

To: RPG programming on the AS400 / iSeries

Subject: RE: subfile SFLFOLD/SFLDROP and cursor positioning

 

For the first issue, you will need to activate the SFLCSRRRN.  When you

read the record format, this field will contain the subfile record #

that the cursor is on.  If you do a CHAIN using this field, you will

retrieve the subfile record.

 

For the second issue, I know of no other way than by calculation to

determine which is the first record on the screen.  And if you have the

SFLRCDNBR activated with *TOP, then I am at a loss of how to determine

which record is at the top.

 

Marvin

 

 

-----Original Message-----

From: rpg400-l-bounces+mradding=dpi-west.com@xxxxxxxxxxxx

[mailto:rpg400-l-bounces+mradding=dpi-west.com@xxxxxxxxxxxx] On Behalf

Of Booth Martin

Sent: Monday, October 24, 2005 12:42 PM

To: RPG programming on the AS400 / iSeries

Subject: subfile SFLFOLD/SFLDROP and cursor positioning

 

subfile SFLFOLD/SFLDROP and cursor positioning

 

Lets say I have a load-all subfile that I am displaying with 4 records,

or

12 records truncated.

 

I was using both SFLDROP and SFLFOLD on F14 and 21/N21.

 

I took F14 out of the RPG code as Folding & Unfolding apparently never

goes

back to the program anyway.

Then I took out the SFLDROP line of code in the DDS, and the program

still

folds and unfolds as I want.  I was surprised I didn't need both SFLDROP

&

SFLFOLD, and that I didn't have to code for *in21 in the RPG, except to

eval

*in21 = MODE after the exfmt.

 

However I am still left with the two issues I was trying to resolve in

the

first place.

 

Firstly, I would like the cursor to remain on the same subfile record

when

the screen flips.  For instance, if the cursor is on subfile record

3(line 9

  10, or 11 of the subfile screen on the unfolded screen I would like to

press F14 to have the folded view, and have the cursor move up to line

three

of the subfile screen record. In the opposite direction I would like the

same to occur, and in addition, show the section of the subfile that has

the

cursor if the cursor happened to be on record 5 through 12 of the

subfile

screen.

 

Secondly, I would like to be able to get the information about the first

record presently being displayed on the screen, regardless of the

location

of the cursor.

 

Thanks.

 

---------------------------------

Booth Martin

http://www.martinvt.com

---------------------------------

--

This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing

list

To post a message email: RPG400-L@xxxxxxxxxxxx

To subscribe, unsubscribe, or change list options,

visit: http://lists.midrange.com/mailman/listinfo/rpg400-l

or email: RPG400-L-request@xxxxxxxxxxxx

Before posting, please take a moment to review the archives

at http://archive.midrange.com/rpg400-l.

 

 

 

 

--

This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list

To post a message email: RPG400-L@xxxxxxxxxxxx

To subscribe, unsubscribe, or change list options,

visit: http://lists.midrange.com/mailman/listinfo/rpg400-l

or email: RPG400-L-request@xxxxxxxxxxxx

Before posting, please take a moment to review the archives

at http://archive.midrange.com/rpg400-l.

 

.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.