Ask the Expert

Possible to automatically refresh display?

I'm trying to create a screen (subfile) to display inventory information. I realize that the automatic refresh screen is more efficient than pressing F5 (refresh). I think WRKACTJOB has a function key F19 (automatic refresh) that I'd like to use. Unfortunately, I have no idea if this is available on my system.
The simple way is to set up second display file (duplicate of the main display file) that will only be used when the user hits the function key F19. Your program should drop into a loop that reads the second display file, rather than doing an EXFMT, use a write, then a read to the display file. This read will be against the second display file created like this:

 CRTDSPF FILE(MYLIB/SECONDDSPF) SRCFILE(MYSRCLIB/QDDSSRC) WAITRCD(15) 

This will cause your program to wait for 15 seconds before returning. When the file returns, check to see if the user hit F3 or F12. If they did, drop back to the original routine. If not, reload the subfile and write/read again.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

This was first published in October 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

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
Sort by: OldestNewest

Forgot Password?

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

Your password has been sent to: