× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: CGI programs in ILE RPG
  • From: "Rick Baird" <rbbaird@xxxxxxxxxxx>
  • Date: Wed, 20 May 1998 17:05:02 -0500
  • Organization: Premium Systems, Inc.

David,

We tried that at first too.  The problem is that it is VERY hard to make 
changes to the html, and test them quickly.

What I ended up doing is to develop the pages on a pc, then use client access 
to move them to source files on the 400.

my programs override to the appropriate member, then they read the source file, 
looking for substitution data.

If they need major changes, I then copy them back to the pc to change.

to make it all work, I used html comment tags to represent my substitution 
tags.  The reason I use comment tags is so that my
replacement tags don't show up on the web page when I'm testing the strait html 
stuff.

for example, the file contains these lines:

<p>Thank you for purchasing the
<!--*PLAN    -->Gold
Coverage Plan.</p>

the program looks for '<!--*PLAN ' in the 1st 10 bytes, and substitutes the 
actual plan description for the entire line.  

When the file on the pc is displayed in a browser, it shows "Gold".

Sometimes, I tag whole sections:

<!--*QUES3  -->  I  have selected the optional $0 
<!--*QUES3  --> deductible</font></td>
<!--*QUES3  --> <td align="RIGHT">

In this case, the data outside the <!--( )--> is only output if they had 
previously marked a check box.  

If you like, I can send you an example or two.

HTH,

Rick

The 
David Gibbs wrote:
> 
> Greetings!
> 
> I'm playing around with a CGI program in RPG to display some
> information from our application as a web page... I'm curious as to
> what approach people are using to build the HTML that the CGI program
> generates.
> 
> Currently, I've got the HTML defined as a compile-time array and I'm
> just kicking through the array, substituting field data in
> placeholders in the array.  Kinda like... send lines 1 through 5,
> setup line 6, send line 6, setup line 7, send line 7, setup line 8,
> etc...
> 
> While it works fine, it's quite tedious... are there better
> approaches?
> 
> TIA!
> 
> david
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.