Problem solve Get help with specific problems with your technologies, process and projects.

Refresh your display

Here's a program to display your files automatically without the input of a user.

To refresh your display file automatically without the input of a user, do the following in your program.

1. Put an INVITE keyword in your display file control record.

2. Either compile the display file with the WAITRCD parm set to the number of seconds you need or add an OVRDSPF FILE() WAITRCD(x) with the number of seconds you want to wait between refreshes.

3. In your RPG program:

               Write  Format Name
               Read   File Name
       Status  if     01331
               exsr   Reset SFL
               exsr   Load  SFL 

In error_subr, check %STATUS for 01331; that's the timeout error and I'd redisplay (rewrite) the record format.


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.

Search400's targeted search engine: Get relevant information on RPG.

Dig Deeper on iSeries CL programming