home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxgdb2.zip / G2Hn.CMD < prev    next >
OS/2 REXX Batch file  |  1997-08-10  |  1KB  |  67 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 'G2Hn --- Testing REXXGDB2.DLL HTML input tag creator function'
  10. say '         (G2HSelect2Input)'
  11. say 'Simon Husin (husin@ibm.net)'
  12. say 'Kent, Washington, U.S.A., Nov 1996 - Aug 1997'
  13. say
  14.  
  15. sq1 = 'Select * from org where deptnumb >= 66'
  16. sq2 = 'Select * from org where deptnumb = 66'
  17.  
  18. htmlfn = 'G22HTML.HTM'
  19. requestedrows = 9999999
  20. nullchar      = ''
  21. varcharlen    = ''
  22. show_border   = '1'
  23. show_rownum   = '1'
  24. show_header   = '1'
  25.  
  26. if rxfuncquery('g2LoadFuncs') then do
  27.    say
  28.    say 'Loading REXXGDB2 Functions...'
  29.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  30.    say 'Result =' g2LoadFuncs()
  31.    end
  32.  
  33. say
  34. say 'Connecting to SAMPLE database...'
  35. call g2connectshare 'SAMPLE'
  36.  
  37. say
  38. '@del' htmlfn '1>NUL 2>NUL'
  39.  
  40. call time 'R'
  41. call          g2h             htmlfn, 1, '<FORM METHOD="POST">'
  42. call          g2hselect2input htmlfn, 1, 'sq1', 999,,,1
  43. call          g2hselect2input htmlfn, 1, 'sq2', 999,,,2
  44. call          g2hselect2input htmlfn, 1, 'sq2', 999,,,3
  45. call          g2h             htmlfn, 1, '</FORM>'
  46. elapse = time('E')
  47.  
  48. '@netscape file:///'htmlfn
  49. /* '@explore -q' htmlfn */
  50.  
  51. say 'Execution time' elapse
  52.  
  53. say
  54. say 'Commiting...'
  55. call g2commit
  56. return 0
  57.  
  58.  
  59.  
  60. error:
  61. say 'Error detected at line' SIGL
  62. return 10
  63.  
  64. syntax:
  65. say 'Syntax error detected at line' SIGL
  66. return 20
  67.