|
SFLRCDNBR(CURSOR) returns the sfl record number at the point where the cursor is. Use the sflrcdnbr to chain to the subfile to get your input. Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 709-576-8132 rpower@xxxxxxxxxx http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill Rich Duzenbury <rduz-midrange@xxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 2006/01/12 02:24 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Problem w/ Window subfile not called On Thu, 2006-01-12 at 09:55 -0700, steema@xxxxxxxxxxxxx wrote: > My problem now is that the file to base this on has changed. > But in general, how do I get the data from the window subfile? > > WHen they hit enter, there is this underline feature to this subfile. One > of those is underlines by the scrolling keys. How do I capture this > selection? > > POSITION TO DESIRED CLS > PRESS F12 TO RETURN > > CLASS CODE CLASS DESC. > AAA EEERFERFEEEEEEEEEEEEEEEEE > ACC AAA > BBB CLASS > CCC SSS > CLB CLUB > CL2 CLASS TEST TEST > FFF FFFFFFFFFFFFFFFFFFFFFFFFF > You can get a record out of the subfile by it's ordinal number. The first record is 1, the second record is 2, and so on. Get the fifth subfile record: chain 5 subfile; if %found(subfile); // got the fifth record, do something. endif; POSITION TO DESIRED CLS > PRESS F12 TO RETURN > Many subfiles use the IBM convention and have an input field on each line where the user can indicate an action, like 2=Change, 5=Display and so forth. In that case, you read all the subfile records and check the selection field to see what action to perform. Yours, however, appears to be driven by the cursor location. Have a look at documentation for the RTNCSRLOC dds keyword. There is probably some translation in the code from the row number (or perhaps a field name) to the subfile record number.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.