Link to home
Start Free TrialLog in
Avatar of tperegoy
tperegoy

asked on

Write Web Page data from AS400 program

I have an application that is set to write AS400 data to a web page.  From the browser address line, I connect via IP address to the AS400 and run my AS400 program (written in RPG ILE) directly from the address line.  The program runs and writes the data directly to a web page via CGI script using the "gethtmlifs" command, then displays the web page.  I write sections at a time to the web page using the "WrtSection" command.  The entire process runs almost instantly.  

Here's the problem:  I need to loop this program to refresh the data.  I have the loop set to 10 seconds in the CL that calls the program.  The CL is the program I run from the address line.  When I do, the browser window just appends to the bottom.  The screen gets longer and longer and the user has to scroll down to see the data.  That will not do.  I want the loop in my program to refresh the screen with the new values of my data and the user oes not have to touch anything.  Essentially, it is displaying production on an assembly line.   As units are produced, the counter on the web page will show that by incrementing.   As the program loops, the screen should refresh with curent data.

Does anyone know how to refresh the page or tell it to rebuild the page from the top?  This is needed urgently so points are available.

Avatar of daveslater
daveslater
Flag of United States of America image

Hi
have you issued the
 callp     wrtsection('*fini')
to clear the buffer?

Dave
Avatar of tperegoy
tperegoy

ASKER

Yes, but that is in my last write command to output the screen.  The last section is named $endform so I "WrtSection $endform *fini"  
ASKER CERTIFIED SOLUTION
Avatar of daveslater
daveslater
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial