h copyright('2008 Relational Data Corporation') /copy *libl/qrpglesrc,rdwtnapi#1 /copy *libl/qrpglesrc,rdcsrapi#1 /copy *libl/qrpglesrc,rdstrapi#1 d wtn e ds extname(rdwtnp) qualified import d names s * d last s 16a varying d n s 10u 0 d squote c '''' /free names = csrNew('XPN100P'); csrSetOrder('upper(LASTNAME), upper(FIRSTNAME)'); dow wtnAction('NAMES'); last = %trimr(strToUpper(wtnQryGet('last'))); if %len(last) < 3; wtnMsgWrt('Please enter a minimum of 3 characters':'':*off); iter; endif; csrSetFilter('LASTNAME like ' + squote + last + '%' + squote); csrRefresh(); n = 0; dow wtnRowWrt('XPN100P'); n = n + 1; enddo; wtnMsgWrt(%char(n) + ' results found':'':*off); enddo; *inlr = *on; /end-free