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



> It's nice to know that with XML a person can be an expert and a novice at
> the same time.  :)  Your XML explanation got me thinking--what can you tell
> me in 50 words or less about CGI?

You'll have to forgive me if I don't go out of my way to make this less
than 50 words.  It's very time consuming to keep rephrasing your sentences
until you get them as concise as possible.

> From my understanding I believe that it's used to process input to web
> pages.  Is it a language?  Is it OS-specific and different for OS/400,
> Linux, etc.?

It's not a language, it's an interface.  In fact, it stands for "Common
Gateway Interface."  It provides a way for a web server to call a program
and get data back from the program.

Are you familiar with STDIN and STDOUT?  If you've ever written software
for either Unix or MS-DOS or in C or Java on the iSeries, you should be
familiar with STDIN/STDOUT.

Basically, the web server connects to your program's STDIN, and sends you
all of the info that the HTTP client has POSTed to it.  You take that
info, interpret it, and generate a web page (or pretty much anything else
that you want) and send it back on the STDOUT.  The web server reads your
STDOUT and sends it back to the HTTP client.

Actually, I should say that the method I just described is called "POST".
It's when you POST data to a CGI script.   YOu can also use a GET method
where the input data is encoded into the URL itself.  With that method,
the web server puts the data into an environment variable -- but you still
use STDOUT to return the results, so it's actually very similar to the
POST method... just a different input source.

There are lots of details, of course... how you interpret the data, how it
corresponds to what the user saw on the web page, etc, that you have to
learn...  but the two paragraphs above give you the "big picture."

> I've created basic web pages with HTML before but never anything that
> processed or saved user input.

IBM provides some APIs with the web server that help you.  They can read
stdin, write stdout, and convert the user input from URL encoded format to
a data structure in your RPG program.  When you write the output, you
usually just write HTML code similar to what you'd have done when you
created your static web pages.

Or, if you want to get a bit more deluxe, you can get CGIDEV2 for free
from IBM. It has some very friendly APIs that not only help you interpret
the input, but make it much easier for you to write the output as well.

Some day I'm going to write some articles on these topics...  so much to
do, so little time...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.