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.


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

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

<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>

<!-- <as400>tabstr **** START TABLE -->
<table border=1>
<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">
<td align=right><font face="Helvetica,Helv,Arial,Sans-Serif">

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

<!-- <as400>end **** END 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

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

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


This thread ...


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