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