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

  1. /* rexx */
  2. /*
  3. signal on syntax  name error
  4. signal on halt    name error
  5. signal on failure name error
  6. */
  7. '@echo off'
  8.  
  9. 'cls'
  10. say
  11. say 'G2Hc --- Testing REXXGDB2.DLL HTML Clob Text tag creator function'
  12. say '         (G2HSelect2Clob)'
  13. say 'Simon Husin (husin@ibm.net)'
  14. say 'Kent, Washington, U.S.A., Jan - Aug 1997'
  15. say
  16.  
  17. sq1 = "SELECT resume from emp_resume where empno = '000130' and translate(resume_format) = 'ASCII'"
  18.  
  19. htmlfn = 'G22HTML.HTM'
  20. requestedrows = 10
  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. say 'SQLCODE='g2connectshare('SAMPLE')
  32.  
  33. say
  34. '@del' htmlfn '1>NUL 2>NUL'
  35.  
  36. call time 'R'
  37. call g2h             htmlfn, 1, '<FORM METHOD="POST">'
  38. call G2HSelect2Clob  htmlfn, 1, sq1, 10, 70
  39. say 'SQLCODE='G2SQLCODE
  40. call G2HSelect2Clob  htmlfn,  , 'sq1', 2, , 'TA2'
  41. say 'SQLCODE='G2SQLCODE
  42. call g2h             htmlfn, 1, '</FORM>'
  43. elapse = time('E')
  44.  
  45. '@netscape file:///'htmlfn
  46. /* '@explore -q' htmlfn */
  47.  
  48. say 'Execution time' elapse
  49.  
  50. say
  51. say 'Commiting...'
  52. call g2commit
  53. return 0
  54.  
  55.  
  56.  
  57. error:
  58. say 'Error detected at line' SIGL
  59. return 10
  60.  
  61. syntax:
  62. say 'Syntax error detected at line' SIGL
  63. return 20
  64.