home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rgiserv.zip / rgi_t1.cmd < prev    next >
OS/2 REXX Batch file  |  1996-05-16  |  2KB  |  58 lines

  1. /* Test the RGIParse Function */
  2. trace i
  3. ntred=1                         /* Assume user entered data */
  4. Say 'Content-Type: text/html'   /* We don't use RGIUtils yet */
  5. Say ''
  6. Say '<form action=cgi-bin/rgi_t2.cmd method=post>'
  7. Say '<html><head><title>'       /* Introduce the document */
  8. Say 'RGI Installation Test'     /* as part of the RGI */
  9. Say '</head></title>'           /* Installation Test */
  10. Say '<body>'
  11. Call RGIParse '-F -K'           /* Invoke RGIParse */
  12. Say '<em>This screen is brought to you RGI_T1.CMD.</em>'
  13. Say '<p>'
  14. If rgi.fname='' Then Do
  15.    Say '<em>You have not entered your first name...</em><br>'
  16.    rgi.fname='...'
  17.    ntred=0
  18.    End
  19. If rgi.cname='' Then Do
  20.    Say '<em>You have not entered where you live...</em><br>'
  21.    rgi.cname='Wherever'
  22.    ntred=0
  23.    End
  24. Say '<p>'
  25. Say 'Hello! <em>'rgi.fname'</em>!'
  26. Say '<p>'
  27. Say 'Today is' date() 'in <em>'rgi.cname'</em>. The time is' time()'.'
  28. Say '<p>In the above text, you should see your first name and the name of the'
  29. Say 'city emphasized. Simple Rexx "Say" statements were used to generate the text.'
  30. Say '<p>'
  31. Say 'The RGIParse argument that was used contained both the -Form and the -Keyword option.'
  32. Say 'The input data is therefore available both as <tt>RGI.<em>n</em></tt> and'
  33. Say 'as <tt>RGI.<em>fldnm</em></tt> variables, where <tt><em>fldnm</em></tt> is the name of the'
  34. Say 'input field in the form.'
  35. Say '<p>'
  36. If ntred Then Do
  37.    Say 'Here is the -Form output:'
  38.    Say '<tt>'
  39.    Do i=1 to rgi.0
  40.       Say '<br>RGI.'i'==>' rgi.i
  41.       End i
  42.    Say '</tt>'
  43.    Say '<p>'
  44.    Say 'Here is the -Keyword output:'
  45.    Say '<tt>'
  46.    Say '<br>RGI.fname==>' rgi.fname
  47.    Say '<br>RGI.cname==>' rgi.cname
  48.    Say '</tt>'
  49.    End
  50. Else Say 'Unfortunately I cannot show it you the output because you did not give me the input.'
  51. Say '<p>'
  52. Say 'Press the'
  53. Say '<input type=submit value=Continue> button now.'
  54. Say '<input type=hidden size=20 name=fname value="'rgi.fname'">'
  55. Say '<input type=hidden size=20 name=cname value="'rgi.cname'">'
  56. Say '</body>'
  57. Say '</html>'
  58.