|
Dear Mr. Sadique, I would like to share my DDS Code with you, so that you can evaluate what am I missing, please. Is it necessary to define SFLRCDNBR as I did not find this keyword in STRSDA. Please advise what am I missing ? I have used SFLCSRRRN for cursor positioning. 0000.30 A DSPSIZ(24 80 *DS3) 0000.40 A INDARA 0000.50 A R SUBFILE SFL 0000.70 A 41 SFLNXTCHG 0000.80 A MLNAME 35A O 8 18 0000.90 A MLCODE 5Y 0B 8 8EDTCDE(4) 0001.00 A 40 DSPATR(PC) 0001.10 A MQTY 5Y 0B 8 55EDTCDE(4) 0001.20 A R SUBFILECTL SFLCTL(SUBFILE) 0001.40 A CA12(12 'EXIT') 0001.50 A RTNCSRLOC(*RECNAME &REC &FLD &POS) 0001.60 A SFLCSRRRN(&RRRN) 0001.70 A SFLMODE(&MODE) 0001.80 A SFLDSP 0001.90 A SFLDSPCTL 0002.00 A 66 SFLCLR 0002.10 A 02 SFLEND(*MORE) 0002.20 A SFLSIZ(0010) 0002.30 A SFLPAG(0010) 0002.50 A 6 8'LOCN' 0002.60 A 7 8'CODE' 0002.70 A 7 18'LOCATION NAME' 0002.80 A 7 55'QTY' 0002.90 A FLD 10A H 0003.00 A MODE 1A H 0003.10 A REC 10A H 0003.20 A POS 4S 0H Best Regards, Luqman "MD, Sadique" <Sadique.MD@xxxxxxx> wrote in message news:1C65F47D22F9F6498EC408D33101F34F01AEBD34@xxxxxxxxxxxxxxxxxxxx > Hi Luqman, > > One easy way of positioning cursor on a subfile record is > By defining Position Cursor (DSPATR(PC)) for that particular field > > Do While not Exitkey > Exfmt subfileCtl > > For any errors/Process > Eval (DSPATR(PC)) indicator = *On > If SFLCSRRRN > *Zeros (SFLCSRRRN will return the RRN number of the cursor > positioned) > Eval SFLRCDNBR = SFLCSRRRN > End If > Eval SFLNXTCHG indcator = *On > Update Sufile Record Format > > EndDo > > Thanks > Sadiq .... > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] > On Behalf Of Luqman > Sent: Thursday, April 06, 2006 1:08 PM > To: rpg400-l@xxxxxxxxxxxx > Subject: How to position cursor on particular row of subfile in code ? > > How can I position the cursor on particular Row of Subfile in code ? > > I have defined rrrn, fld and rec hidden fields in SFLCSRRRN and RTNCSRLOC. > > What I have not used is Cursor Position of RTNCSRLOC, do I have to use this, > if so, how ? > > > What I need to do is that whenver the user press Enter Key, the Cursor > should come on the same row, from where it left ? > > My code is as under:- > > Do While not Exitkey > Exfmt subfileCtl > RRRN Chain Subfile > Eval myCode=CodeField > Eval myName=NameField > Enddo > > Best Regards, > > Luqman > > > > -- > 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 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.