10 pts.
 How do I write a RPG automatic refresh screen like WRKSYSACT?
I would like a RPG applicate to automatically refresh the page without the user's return. I have tried the write and read to the subfile with the CRTDSPF WAIT field but with no success. Any suggestions

Software/Hardware used:
ASKED: January 21, 2008  5:24 PM
UPDATED: January 22, 2008  12:07 PM

Answer Wiki:
Here is a simple program which will, every 10 seconds, refresh the display. If the user hits Enter the refresh will be immediate. If the user hits F3 the program will end. First the environment. Create a *DTAQ named SIMPLETEST <pre> CRTDTAQ DTAQ(SIMPLETEST) MAXLEN(80) </pre> Create the DSPF SIMPLEDSPF with the following source: <pre> CA03(03) R RECORD INVITE 2 20 TIME </pre> and the command: <pre> CRTDSPF FILE(*CURLIB/SIMPLEDSPF) SRCFILE(QDDSSRC) DFRWRT(*NO) DTAQ(*CURLIB/SIMPLETEST) </pre> Create the RPG PGM USESIMPLE with the following source: <pre> fSimpleDSPFcf e workstn dRcvDtaQ pr extpgm('QRCVDTAQ') d DtaQName 10 const d DtaQLib 10 const d ReceiverLenRtn 5 0</pre>
Last Wiki Answer Submitted:  January 22, 2008  12:07 pm  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _