MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2014

Re: need for simple web screen



fixed

I suggest looking at CGIDEV2 - you can get it at www.easy400.net

What you do is create a template - kind of like a display file - it is externalized HTML, and it contains markers for sections of HTML (like records) and for variable data (like fields).

There are some examples, one pretty basic could be simplified even more for your example - here's a URL to it - http://cgidev2.easy400.net/cgidev2p/ctrdvy.pgm

What you want to display is easily done using an HTML table. Below, after my HTH, is a much-simplified version of one of the example at the site I cited - Giovanni uses <as400> as the marker for the sections - it is recommended to put HTML comments as part of those markers, then they don't show up when you test the layout. I did that in this example - wrapping comment tags around what Giovanni has. You can copy this example into a text editor, save it as an HTML file, then display it in a browser.

I also put in names to match your sample.

Variables are marked with leading /% and trailing %/ - I didn't change these to comments, but that is also recommended.

The RPG is on that page I cited - you'll want to take out references to things not contained here, but feeding the table is a matter of a simple loop, just as you do now for showing a subfile.

HTH
Vern

<!-- <as400>top **** START HTML -->
Content-type: text/html
Expires: 0

<html>
<head>
<title>Our shipments</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="SHIPMENTS" value="it"/>
</head>

<body text="black" bgcolor="white" link="blue" vlink="blue" alink="blue">

<!-- <as400>none **** NO SHIPMENTS-->
<font face="Helvetica,Helv,Arial,Sans-Serif" color="red">
<b>No shipments available</b>
</font>

<!-- <as400>tabstr **** START TABLE -->
<table border=1>
<th></th>
<th align=left><font face="Helvetica,Helv,Arial,Sans-Serif">
<b>Order type</b></font></th>
<th align=center><font face="Helvetica,Helv,Arial,Sans-Serif">
<b>Total shipments<br>(days)</b></font></th>

<!-- <as400>tabrow **** TABLE ROW -->
<tr><td><font face="Helvetica,Helv,Arial,Sans-Serif">
/%ORDERTYPE%/
</font></td>
<td align=right><font face="Helvetica,Helv,Arial,Sans-Serif">
/%SHPMNTCNT%/
</font>
</td></tr>

<!-- <as400>tabend **** END TABLE -->
</table>

<!-- <as400>end **** END HTML -->
</body></html>


On 5/5/2014 8:41 AM, Hoteltravelfundotcom wrote:
What are some methods to do a simple web screen it could be on a company
server.

It would show the actual shipments that have gone out till that point in
time.

it would get this data from one table on the ibm i, already summarized.
so we would show something like

Order type Total shipments
ABC 100
DEF 200

etc.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact