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

  1. /* rexx */
  2. signal on error
  3. signal on syntax  name error
  4. signal on halt    name error
  5. signal on failure name error
  6. '@echo off'
  7.  
  8. 'cls'
  9. say
  10. say 'G2Ht --- Testing REXXGDB2.DLL HTML table tag creator function'
  11. say '         (G2HSelect2Table)'
  12. say 'Simon Husin (husin@ibm.net)'
  13. say 'Kent, Washington, U.S.A., Nov 1996 - Aug 1997'
  14. say
  15.  
  16. sql = 'Select * from staff'
  17. sq2 = 'Select * from department'
  18. sq3 = 'Select * from org'
  19. sq4 = 'Select * from employee'
  20.  
  21. htmlfn = 'G22HTML.HTM'
  22. requestedrows = 9999999
  23. nullchar      = ''
  24. varcharlen    = ''
  25. show_border   = '1'
  26. show_rownum   = '1'
  27. show_header   = '1'
  28.  
  29. if rxfuncquery('g2LoadFuncs') then do
  30.    say
  31.    say 'Loading REXXGDB2 Functions...'
  32.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  33.    say 'Result =' g2LoadFuncs()
  34.    end
  35.  
  36. say
  37. say 'Connecting to SAMPLE database...'
  38. call g2connectshare 'SAMPLE'
  39. if result \= 0 then do
  40.    say 'SQLCODE'result
  41.    return 10
  42.    end
  43.  
  44. say
  45. '@DEL' htmlfn '1>NUL 2>NUL'
  46.  
  47. call time 'R'
  48. call          g2h             htmlfn, 1, '<FORM METHOD="POST">'
  49. call          g2hselect2table htmlfn, 1, 'sq4', 999,,,1,1, 1
  50. call          g2hselect2table htmlfn, 1, 'sq3', 999,,, ,1, 1
  51. call          g2hselect2table htmlfn, 1, 'sq2', 999,,,1, , 1
  52. call          g2hselect2table htmlfn, 1, 'sql', 999,,,1,1, 1
  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.