Iseries automatic refresh screen

I have this working to automatically refresh one screen, but I need it to refresh multiple screens.
nickmbnabbAsked:
Who is Participating?
 
MurpheyConnect With a Mentor Application ConsultantCommented:
Hi nickmbnabb,

I tested the example myself and it runs great.
compiled the DDS with  WAITRCD(5)

RPG - HKKPD
A                                      DSPSIZ(24 80 *DS3)                    
A                                      CA01(01 'HELP')                       
A                                      CA03(03 'EXIT')                       
A                                      INVITE                                
A          R SCREEN1                                                         
A                                  1 19'TEST WAITRCD PARAMTER TO TIMEOUT D-  
A                                      ISPLAY'                               
A                                      DSPATR(HI)                            
A                                      DSPATR(UL)                            
A                                  9 28'INPUT:'                              
A            INPUT          1A  B  9 35                    
A                                 22  7'F3=EXIT'           
A                                      COLOR(BLU)          
A                                 14 28'Output:'           
A            COUNT          3  0O 14 36                    

Open in new window


RPG - HKKP
FHKKPD     CF   E             WORKSTN Infds(Infds)                     
F                                     Maxdev(*File)                    
DInfDs            DS                                                   
D Status            *Status                                            
C                   Dow       *IN03 = *Off                             
C                   Write     Screen1                                  
C                   Read      HKKPD                                9999
C                   If         *In99 = *On And Status = 1331           
C                   Eval      COUNT += 1                               
C                   EndIf                                              
C                   Enddo                                              
C                   Eval      *Inlr = *On                              

Open in new window

0
 
MurpheyApplication ConsultantCommented:
Hi,
Can you explain a little more about what you mean by refresh and what with multiple screens,
What kind of program is it?
Does the program require user input?
or is it output only?

RPG or only CL?

A complete screen or messages only?


0
 
Gary PattersonVP Technology / Senior Consultant Commented:
Can you elaborate?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
nickmbnabbAuthor Commented:
I have an input program, PROGRAM1, that adds to FILE1.  I have that file displaying on a screen at Location1

Location 1 and Location 2 is running my program which automatically refreshes the display of FILE1 as soon as PROGRAM1 adds to FILE1.   When I add to the file through the input program, I have succeeded in having the screen at Location1 instantly update.  But  Location 2 does not update automatically.
0
 
nickmbnabbAuthor Commented:
Let me try again, to be more clear.

I have input program adding to a file.

I have a display program displaying that file.

I have succeeded in having the display program instantly refresh and show the additions made through the input program.

However, if I start two separate instances of the display program, only one instantly refreshes.
0
 
nickmbnabbAuthor Commented:
By refresh I mean without any operator intervention, the screen updates.
0
 
tliottaCommented:
What mechanism (method) is used by the refresh program to know that it's supposed to refresh the screen?

Tom
0
 
nickmbnabbAuthor Commented:
I compiled the DDS using WAITRCD(5).  At first I had MAXDEV(1), thought maybe that was the problem, but changing it to a higher number did not help.

I use READ(E) and check for status 01331 to determine if there was no operator intervention.

Maybe there's an easier, cleaner method?   I'm having some other issues when there is operator intervention, but I believe I can work those out, hopefully.
0
 
MurpheyApplication ConsultantCommented:
Hi Nick,

Did you add the INVITE to the screen (DDS) ?

See item on "Automatically Logging Off Inactive Workstations"
They use the same technique
you can find it on : http://www.itjungle.com/mgo/mgo052303-story01.html

Regards,
Murph


0
 
nickmbnabbAuthor Commented:
Yes, I did.  
0
 
Gary PattersonVP Technology / Senior Consultant Commented:
Why not just post the code and dds so we can actually see what we are dealing with?
0
 
nickmbnabbAuthor Commented:
Thanks, all, I saw where my issue was.  It WAS updating both screens, but because I was displaying the "new" records in a different color, the second screen was not recognizing it as new and put it with the "old" records.   It was a timing issue in my program.

Thanks to everyone for taking the time to help me out here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.