[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Write Web Page data from AS400 program

Posted on 2006-10-22
6
Medium Priority
?
284 Views
Last Modified: 2012-08-14
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.

0
Comment
Question by:tperegoy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 14

Expert Comment

by:daveslater
ID: 17787300
Hi
have you issued the
 callp     wrtsection('*fini')
to clear the buffer?

Dave
0
 

Author Comment

by:tperegoy
ID: 17787578
Yes, but that is in my last write command to output the screen.  The last section is named $endform so I "WrtSection $endform *fini"  
0
 
LVL 14

Accepted Solution

by:
daveslater earned 1000 total points
ID: 17787590
Hi
have a look at this?it might help

http://www-922.ibm.com/cgidev2o/faq15.htm?ts=ts20061023104654

control the refresh from the browser not the cl

Dave
0
 
LVL 33

Assisted Solution

by:shalomc
shalomc earned 1000 total points
ID: 17812187
Simply add this to your html inside the <head> section:

<meta http-equiv="refresh" content="10">

Another way is by the xmlhttp javascript method - the AJAX way.

<script>
function GetFromRPG(txtFile) {
       var RPGURL = "http://yourserver/" + escape(txtFile) ;
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.Open('GET', RPGURL , false);
    xmlhttp.Send();
    document.write(xmlhttp.responseText);
    return xmlhttp.responseXML;
}

</script>

ShalomC
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question