|
On the DDS for the screen: A RTNCSRLOC(&RCD &FLD &POS) A RCD 10A H A FLD 10A H A POS 4S 0H &FLD will return the actual field name that the key is pressed on. c select c when fld = 'HAPRNT' c movel prmeq# haprnt c when fld = 'HAOTH1' c movel prmeq# haoth1 c when fld = 'HAOTH2' c movel prmeq# haoth2 c when fld = 'HAOTH3' c movel prmeq# haoth3 c when fld = 'HAOTH4' c movel prmeq# haoth4 c when fld = 'HAOTH5' c movel prmeq# haoth5 c other c movel prmeq# hamont c endsl 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 "Douglas W. Palme" <dpalme@xxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 2006/01/12 02:46 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 Is there a way to also get the field I am on? On Thu, 12 Jan 2006 14:33:02 -0330, RPower wrote > 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. > > -- > 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. If you bought it, it was hauled by a truck - somewhere, sometime.
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.