* * To compile: * * CRTRPGPGM PGM(YOURLIB/SFLWDWRG) SRCFILE(YOURLIB/QRPGLESRC) * *======================================================================= Fsflwdwdf cf e workstn F sfile(window1:rrn1) Fsfl001lf if e k disk * ***************************************************************** * Main Routine ***************************************************************** C *entry plist C parm dbidnm * * Clear then build the initial subfile * C exsr clrsf1 C exsr sflbld * C exfmt sf1ctl * * If enter was hit, return the selected record * C if (not *inkc) and (not *inkl) C rrn1 chain window1 C else C eval dbidnm = 0 C endif * C eval *inlr = *on * ***************************************************************** * CLRSF1 - Clear the subfile ***************************************************************** * C clrsf1 begsr * * Clear relative record numbers and subfile * C eval rrn1 = *zero C eval *in31 = *on C write sf1ctl C eval *in31 = *off C eval *in32 = *off * C endsr * ***************************************************************** * SFLBLD - Build the List ***************************************************************** * C sflbld begsr * * Load the subfile * C *loval setll sfl001lf C dou %eof C read sfl001lf C if not %eof C eval rrn1 = rrn1 + 1 C eval FULLNM = DBLNAM + DBFNAM C write window1 C endif C enddo * * If no records are loaded to subfile, don't display it * C if rrn1 = *zero C eval *in32 = *on C else C eval rrn1 = 1 C endif * C endsr