That's a good catch.

AFAIK, cursor positioning is processed in this order:

1. CSRLOC(ROWPOS COLPOS)
2. DSPATR(PC)
3. SFLRCDNBR
4. first input field on screen.

If you have multiple DSPATR(PC), the first one on the screen is where
the cursor goes.

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company.


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Stephen Coyle
Sent: Friday, June 06, 2014 1:33 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Issue with SLFLRCDNBR(CURSOR)

I see an unconditional DSPATR(PC) in the subrec DDS.
Maybe that is interfering with the SFLRCDNBR?
Just something to try...

- Steve


On Fri, Jun 6, 2014 at 3:26 PM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

Booth,
From the DDS Reference Manual:
If CURSOR is specified, the cursor is placed in the subfile record
whose relative record number is identified by the contents of this
field. The cursor is positioned at the first input-capable field in
the subfile record. If there is no input-capable field, the cursor is
positioned at the first output-only or constant field. For example, if

a page can contain three records, and nine records are contained in
the subfile, a SFLRCDNBR field value of 8 causes records 7, 8, and 9
to be displayed. If CURSOR is specified, the cursor appears in record
8.

Based on this, my code should be working.
I think I am missing something.
Perhaps due to the subfile being in a window?

Jeff Young
Sr. Programmer Analyst

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.