home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxgdb2.zip / G2Hl.CMD < prev    next >
OS/2 REXX Batch file  |  1997-08-10  |  2KB  |  75 lines

  1. /* rexx */
  2. signal on syntax  name error
  3. signal on halt    name error
  4. signal on failure name error
  5. '@echo off'
  6.  
  7. 'cls'
  8. say
  9. say 'G2Hl --- Testing REXXGDB2.DLL HTML list tag creator function'
  10. say '         (G2HSelect2List)'
  11. say 'Simon Husin (husin@ibm.net)'
  12. say 'Kent, Washington, U.S.A., Dec 1996 - Aug 1997'
  13. say
  14.  
  15. sq1 = 'Select id, name||'', ''||job from staff'
  16.  
  17. htmlfn = 'G22HTML.HTM'
  18. requestedrows = 10
  19. nullchar      = ''
  20. varcharlen    = ''
  21.  
  22. if rxfuncquery('g2LoadFuncs') then do
  23.    say
  24.    say 'Loading REXXGDB2 Functions...'
  25.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  26.    say 'Result =' g2LoadFuncs()
  27.    end
  28.  
  29. say
  30. say 'Connecting to SAMPLE database...'
  31. call g2connectshare 'SAMPLE'
  32.  
  33. '@del' htmlfn '1>NUL 2>NUL'
  34.  
  35. say
  36.  
  37. call time 'R'
  38. call          g2h htmlfn, 1, '<FORM METHOD="POST">'
  39. call          g2h htmlfn, 1, '<HR>Default (UL)<BR>'
  40. call          g2hselect2list htmlfn, 1, 'sq1', requestedrows
  41.  
  42. call          g2h htmlfn, 1, '<HR>Unordered list (UL)<BR>'
  43. call          g2hselect2list htmlfn, 1, 'sq1', requestedrows,,,'UL'
  44.  
  45. call          g2h htmlfn, 1, '<HR>Ordered list (OL)<BR>'
  46. call          g2hselect2list htmlfn, 1, 'sq1', requestedrows,,,'OL'
  47.  
  48. call          g2h htmlfn, 1, '<HR>Dir list (DIR)<BR>'
  49. call          g2hselect2list htmlfn, 1, 'sq1', requestedrows,,,'DIR'
  50.  
  51. call          g2h htmlfn, 1, '<HR>Menu list (MENU)<BR>'
  52. call          g2hselect2list htmlfn, 1, 'sq1', requestedrows,,,'MENU'
  53. call          g2h htmlfn, 1, '</FORM>'
  54. elapse = time('E')
  55.  
  56. '@netscape file:///'htmlfn
  57. /* '@explore -q' htmlfn */
  58.  
  59. say 'Execution time' elapse
  60.  
  61. say
  62. say 'Commiting...'
  63. call g2commit
  64. return 0
  65.  
  66.  
  67.  
  68. error:
  69. say 'Error detected at line' SIGL
  70. return 10
  71.  
  72. syntax:
  73. say 'Syntax error detected at line' SIGL
  74. return 20
  75.