While there are more recent products for web development on i5, here is a bog standard request for IBM's Net.data product which has always been shipped ready to go as QHTTPSVR/DB2WWW.
I created a very basic demo that displays a report from which you can add, update or delete an ice cream from a file containing just a flavour and image.
Step 1 is to update your Apache config.
Step 2 is to enter the source code below into the IFS file /home/demo/macros/icecream
Then navigate to http://(yourdomain)/test/cgi/icecream/report
1. To run this demo your Apache httpd.conf file needs these directives
<Location /test>
Order Allow,Deny
Allow From all
</Location>
<Directory /home/demo>
Order Allow,Deny
Allow From all
</Directory>
ScriptAliasMatch ^/test/cgi/(.*) /QSYS.LIB/QHTTPSVR.LIB/DB2WWW.PGM/home/demo/macros/$1
MapMatch ^/test/(.*) /home/demo/Html/$1
2. All the source code below goes into one file named /home/demo/macros/icecream
%function(dtw_sql) dspList() {
select * from qgpl.icecreams
%report { <table>
%row { <tr>
<td><a href="$(V_IMAGE)">$(V_FLAVOUR)</a></td>
<td><a href="edit?flavour=$(V_FLAVOUR)">Edit</a></td>
</tr>
%} </table>
%}
%}
%function(dtw_sql) updateItem() {
update qgpl.icecreams set image='$(image)' where flavour='$(flavour)' with NC
%}
%function(dtw_sql) deleteItem() {
delete from qgpl.icecreams where flavour='$(flavour)' with NC
%}
%function(dtw_sql) insertItem() {
insert into qgpl.icecreams values('$(flavour)', '$(image)') with NC
%}
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Sunday, 9 December 2012 10:39 a.m.
To: Midrange Systems Technical Discussion
Subject: Ice cream
I am not sure if this request is in the right forum, or even if it is on-topic, but here goes.
I like to do demonstrations/examples of basic techniques on my website.
Anyone who has visited www.martinvt.com/ knows the stuff is pretty simple stuff. It has been in my mind for some time to do a demo of a simple Intranet application that does various things with a simple
physical file. After several false starts, confusion, and missteps, I
realize that this simple idea is still too complex for my current understanding.
My intention is to have a dual-sided application: do the tasks both
with 5250 green screen and with a browser application. Lets say I have
a physical file of flavors of ice cream with a link to an image of the item. I wish to add/update/delete to the file, and do a couple or reports from the file, including displaying the image in the browser.
All on an i.
I have lots of questions, but probably the first question should be: Is there already an example out there somewhere that I should look at? The second question is: Am I tilting at windmills? Is this a foolish idea with no useful purpose? Third, is this something that is of interest to average RPG programmers?
This mailing list archive is Copyright 1997-2026 by midrange.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 on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.