* * To compile: * * CRTRPGPGM PGM(XXX/DTAENTRG) SRCFILE(XXX/QRPGLESRC) * *======================================================================= Fdtaentdf cf e workstn F sfile(sfl1:rrn1) Fsfl001pf if a e k disk * ***************************************************************** * Main Routine ***************************************************************** * * Initialize subfile - RRN1 has to > 0 to initialize records * C eval *in31 = *on C eval rrn1 = 1 C write sf1ctl C eval *in31 = *off C eval *in90 = *on * * Do loop to process the subfile until F3 or F12 is pressed * C dou *inkc or *inkl * C write fkey1 C exfmt sf1ctl * * Process changes if enter key pressed * C if (not *inkc) and (not *inkl) C exsr prcsfl C endif * C enddo * C eval *inlr = *on * ***************************************************************** * PRCSFL - Process the subfile ***************************************************************** * C prcsfl begsr * C readc sfl1 * * Do loop to process until all changed records are read * C dow not %eof * C select * * Add when something's in the subfile * C when dblnam > *blanks C *hival setgt sfl001pf C readp sfl001pf C write pfr * C endsl * C readc sfl1 C enddo * C endsr *