Switch to Italian Language
Giovanni's logo
Basic demos to learn from
this means Version 2
power search
blue line

Mel's demos include examples of all the services available through his service program.
Giovanni's demos just stick on the basic services of Mel's service program.
They are therefore much simpler.
Our suggestion is to start looking at Giovanni's demos, then to go into Mel's ones.

Mel Rothman's demos Giovanni Perotti's demos
  1. start this demo Computer Discount House No. 1
    It's a very simple demo, intended to demonstrate and teach the basics of Mel's service program.
    You would enter some data through an HTML form and press a button to invoke a CGI.
    The CGI returns an HTML where your inputs are displayed, along with some data read from a simple database file.
    By going through the externally defined HTML response source member, and the source of the CGI, you'll learn about 90% of the services provided from Mel's CGI service program.
    Note 1.1. This demo uses the getinput subprocedure to read the input string.
    Note 1.2. It uses the subprocedure CvtDb to parse the input fields into the fields of an externally defined data structure.
    Note 1.3. Subprocedures cgivarcnt and cgivarval are used to retrieve multiple occurrences of the same variable in the input string (as the external DS technique would provide just the first occurrence).
    View
  2. start this demo Computer Discount House No. 2
    Note 2.1. This demo uses the getinput subprocedure to read the input string.
    Note 2.1. It uses subprocedure cgivarval to retrieve unique input variables into program defined fields.
    Note 2.3. Subprocedures cgivarcnt and cgivarval are used to retrieve multiple occurrences of the same variable in the input string.
    View
  3. start this demo Computer Discount House No. 3
    Note 3.1. This demo uses the zhbgetinput subprocedure to read the input string.
    Note 3.1. It uses subprocedure zhbgetvar to retrieve unique input variables into program defined fields.
    Note 3.3. Subprocedures zhbgetvarcnt and zhbgetvar are used to retrieve multiple occurrences of the same variable in the input string.
    View
  4. start this demo Computer Discount House No. 4
    Note 4.1. This demo is the same as Computer Discount House No. 3. The only difference here is that the external HTML script is loaded from an IFS stream file, rather than from a source member.
    See pages for more information.
    View
     
  5. start this demo Computer Discount House No. 5
    Note 5.1. This demo is the same as Computer Discount House No. 4. The only difference here is that the external HTML script is loaded from several IFS stream file, using subprocedure getHtmlifsMult.
    See pages for more information.
    View
   All Giovanni's demos use the best techniques to read and to parse the query input string:
  • subprocedure zhbgetinput subprocedure to read the input string
  • subprocedure zhbgetvar to retrieve unique input variables into program defined fields.
  1. start this demo Hello
    This is the simplest CGI demo in the world. You type your name and you get it back along with the current release of your OS/400.
    It is used to validate the HTTP PTF status on your OS/400.
    View
  2. start this demo Just an opinion
    This is another simple CGI demo. You ask the CGI to provide you with its opinion about a subject of your choice. The CGI gives you one out of five predefined answers, randomly.
    View
  3. start this demo Our delivery times
    This demo illustrates how to create a listing, to be viewed page by page. This -in concepts- is similar to processing a traditional 5250 single page subfile.
    If features dynamic position to, pageup, and pagedown buttons.
    View
  4. start this demo Read-Change a subfile
    This demo illustrates how to process the input fields from a table in a way similar to the 5250 subfile READC.
    The program also features techniques to convert character-numeric input fields to program numeric variables (an area where programmers usually feel quite unconfortable).
    View