home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxgdb2.zip / G2CLOB.CMD < prev    next >
OS/2 REXX Batch file  |  1997-08-10  |  2KB  |  63 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 'G2CLOB --- Testing REXXGDB2.DLL CLOB function(s)'
  11. say 'Simon Husin (husin@ibm.net)'
  12. say 'Kent, Washington, U.S.A., November 1996'
  13. say
  14.  
  15. sq5 = "SELECT resume from emp_resume where empno = '000130' and translate(resume_format) = 'ASCII'"
  16.  
  17. if rxfuncquery('g2LoadFuncs') then do
  18.    say
  19.    say 'Loading REXXGDB2 Functions...'
  20.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  21.    say 'Result =' g2LoadFuncs()
  22.    end
  23.  
  24. say
  25. say 'Connecting to SAMPLE database...'
  26. call g2connectshare 'SAMPLE'
  27.  
  28. say
  29. say  'SQ5='sq5
  30. say
  31.  
  32. call time 'R'
  33. say  'G2SELECTCLOB RESULT 1 (SQ5 Value)='g2selectclob(sq5,   'RESUM1.ASC')
  34. say  '---elapse   ='time('R')
  35. say
  36. say  'G2SELECTCLOB RESULT 2 (SQ5)......='g2selectclob('sq5', 'RESUM2.ASC')
  37. say  '---elapse   ='time('R')
  38. say
  39. say  'G2SELECTCLOB RESULT 3 (value)....='g2selectclob("SELECT resume from emp_resume where empno = '000130' and translate(resume_format) = 'ASCII'", 'RESUM3.ASC')
  40. say  '---elapse   ='time('R')
  41. say
  42. say  'Retrieving (using SQ5 Value) 100 times...'
  43. do 100
  44.    call g2selectclob sq5, 'RESUM4.ASC'
  45.    end
  46. elapse = time('R')
  47. say  '---elapse   ='elapse '(total),  'elapse / 100 '(per call on average)'
  48.  
  49. say
  50. say 'Commiting...'
  51. call g2commit
  52. return 0
  53.  
  54.  
  55.  
  56. error:
  57. say 'Error detected at line' SIGL
  58. return 10
  59.  
  60. syntax:
  61. say 'Syntax error detected at line' SIGL
  62. return 20
  63.