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



Hi, y'all

At 09:02 AM 5/19/1998 -0700, you wrote:
>David,
>
>Although this was not done for CGI specifically, when we need to perform some
>form of scripting, we place the skeleton script in a text file and embed
our own
>control characters.
>
>The program reads this text file and merges in the data.
>
>It makes changes a lot easier than recompiling the program.  It also has the
>benefit of allowing you to override the text file to another so a "universal"
>script creation program can be developed.
>
>In our case, we used the &xxxxx to indicate the placement of a field
value. If
>&xxxxx was not a valid field name, we assumed that it was to be output as is.
>This way HTML &xxxx keywords would be passed along.
>
>==================================================
>
>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!

Have you considerd Net.Data? It is itself a CGI program. You write macros
(kind of like your text files, James) which the Net.Data program runs
through. HTML output is a snap, since it's plaintext in the macro. And no
use of those API's to get environment variables and URL parameters, etc.

You can run SQL statements straight from the macro, as well as calling any
AS/400 program, and also REXX, both inline and in procedures.

In addition, any changes you make are reflected at the browser as soon as
you reload the page.

I've written the beginning of an order status inquiry app. I get at
production data via our development machine. DRDA is used to process
things. If you have any questions, please ask. Otherwise, check out
<http://www.as400.ibm.com/netdata> . There's a lot of good info there,
including a forum that's watched by the developers.

Cheers

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480


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