|
----- Message from Bill Howie <blhowie66@xxxxxxxxx> on Fri, 20 Mar<rpg400-l@xxxxxxxxxxxx>
2015 14:40:13 -0400 -----
To:
"RPG programming on the IBM i (AS/400 and iSeries)"
the
Subject:
Re: Positioning cursor on a subfile record
Michael,
I have tried your suggestion. After the user presses a command key on a
particular record, I set the value of the hidden field associated with
SFLRCDNBR in the DDS to what's in the hidden field associated with
SFLCSRRRN in the DDS (which contains the record number for the record
user selected), and then an EXFMT of the subfile control record happensof
(there is a WRITE of a different display format immediately before this
that displays command key text). Still positions to the first record
the subfile. No DSPATR(PC) in play for this subfile.wrong
Looking at the definition of SFLRCDNBR, it says that using this keyword
displays "the page of the subfile containing the record whose relative
record number is contained in this field". So am I interpreting it
that it will actually position it to the SPECIFIC subfile record?Because
there are only 3 records in the entire subfile, so if you take thisthe
definition literally, positioning the cursor to the first record is
technically displaying the page of the subfile that contains the record
user selected. Maybe I've got the wrong keyword for positioning on ato
specific record?
Bill
On Tue, Mar 17, 2015 at 11:54 AM, <MichaelQuigley@xxxxxxxxxx> wrote:
Bill,
Sorry I've been away from the list for a few days. What you're trying
whendo should work. There are a couple things that've bit me or coworkers
meanwe've tried this.
1) You say you're "...moving the field value that goes along with
SFLCSRRRN to the SFLRCDNBR field and updating the subfile." Do you
(i.e.,you're updating the individual subfile record or rewriting the subfile
control record with the new SFLRCDNBR value? You need to rewrite
You doupdate) the control record. You do not need an input capable field.
isnot need to do a DSPATR(PC).
2) A prior DSPATR(PC) can mis-position the cursor. One common problem
individualto leave the indicator for DSPATR(PC) turned on and update the
onsubfile record before updating the control record. That or defining PC
another field in the subfile record without any indicator.
Those are the big ones. Have you got this working yet?
Michael Quigley
Computer Services
The Way International
www.TheWay.org
As an Amazon Associate we earn from qualifying purchases.
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.