Hello User sample

The following CGI program assumes that the user has been asked to enter his or her name, and that the entered name is stored in the CGI variable "username". This can be accomplished using the following HTML form:

<form action="/cgi-bin/simple.acu" method="get">
Please enter your name or leave blank for "anonymous": 
<input type="text" name="username" size=60>
<input type="submit" value="Submit">

This program also uses an HTML template, "greeting.html". Here is an example:

Hello %%username%% 
This Web page is still under construction. 
Please try again in a few days.

The CGI program then, is as follows:

identification division.
program-id. simple.
data division.
working-storage section.
01  input-output-form is external-form is identified by "greeting".
    03  user-name  pic x(60) identified by "username".
procedure division.
    accept input-output-form.
    display input-output-form.