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.
Dig Deeper on iSeries CL programming