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



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(&#1RCD &#1FLD &#1POS)
> 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.
>
> 




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.