|
I don't know of anyway to lock the arrow keys, but what I would do is to force the readc of all the records in the subfile and revalidate them if that's what you are getting at. If it's in error, then you could deal with it prior to performing your F12 save function. As for setting the cursor to column 3 I wonder what would happen if you were to set the value of the &POS field in the subfile record with the same record #? I'm thinking that might work? Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Luqman" <pearlsoft@xxxxxxxxxxxx> Sent by: rpg400-l-bounces+rpower=stjohns.ca@xxxxxxxxxxxx 08/11/2004 11:31 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To rpg400-l@xxxxxxxxxxxx cc Subject Re: Subfile Hi, Thanks v. much for your beneficial advise, while I was already using SFLCSRRRN and RTNCSRLOC, I was just missing, how to use Chain Statement with subfile, and I got it. Its like that. > A SFLCSR1 CHAIN SUBFILE Further, can I lock the user from using the Arrow Keys in Subfile, just in case the user uses the arrow keys and change the values and without pressing enter, press F12 to save, how can I do so ? I mean, the user cannot move to any other column without pressing enter. Secondly, how can I position the cursor in subfile through code, say after validating the item no. the item name is displayed in 2nd column, and the cursor should be position on 3rd column to enter quantity. Best Regards, Luqman "Larry Ducie" <larry_ducie@xxxxxxxxxxx> wrote in message news:BAY21-F5sA91E9GQvnb0001fb30@xxxxxxxxxxxxxx > Hi Lugman, > > You need the SFLCSRRRN keyword in your DDS. This will return the relative > record number of the subfile row the cursor was over when a valid function > key (or Enter) was pressed. > > A SFLCSRRRN(&SFLCSR1) > A RTNCSRLOC(RCD FLD POS) > A #1FLD 10A H > A #1RCD 10A H > A #1POS 4S 0H > A SFLCSR1 5S 0H > > If you use SFLCSRRRN with RTNCSRLOC you can retrieve the value of a field > within a subfile record by placing the cursor over it and pressing Enter. > You can even specify what byte of a field on a subfile row the cursor was > over. This is very useful for prompting input fields, or for help systems. > > Remember, you need to chain to the subfile using the SFLCSRRRN value (if > it's > 0) to retrieve the field values. > > Cheers > > Larry Ducie > > > -- > 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. This e-mail communication and accompanying documents is intended only for the individual or entity to which it is addressed and may contain information that is confidential, privileged or exempt from disclosure under applicable law. Any use of this information by individuals or entities other than the intended recipient is strictly prohibited. If you have received this in error, please notify the sender and delete all the copies (electronic or otherwise) immediately.
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.