How do I write a RPG automatic refresh screen like WRKSYSACT?

10 pts.
Tags:
CRTDSPF
RPG
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following