*===================================================================== * To Compile: * * CRTBNDRPG PGM(XXX/PRTR1) SRCFILE(XXX/QRPGLESRC) * *===================================================================== * Prtr1: Example of using a Printer File and Display File for Printing *===================================================================== FPRTD1 CF E WORKSTN * Case Flow Management System - Block Master FPrtdp1 O E Printer Oflind(*In05) * Printer File *===================================================================== * Loop through, display screen until Indicator (Function Key) 03 is * turned on. C Dow *In03 = *Off * * Display Screen Format C Exfmt S1 * * If F3 is pressed, indicator 03 comes on, program ends. C If *In03 = *On C Eval *Inlr = *On C Return C Endif * * If Item number field on display is not equal to blanks, print it. C If Item <> ' ' * * If Indicator 05, which is the over flow indicator, is on, write * the HDR format record in the printer file. C If *In05 = *On * Turn of Overflow Indicator C Eval *In05 = *Off C Write Hdr C Endif * * Write the printer file detail line. C Write Dtl * * Move blanks to the item number field before redisplaying the screen. C Clear Item * C Endif * C Enddo C Eval *Inlr = *On ******************************************************************* * * Initialize - This subroutine automatically performed when the * RPG Program is initiated. * ******************************************************************* C *INZSR Begsr * Set on OverFlow Indicator C Eval *In05 = *On C Endsr