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

  1. /* rexx */
  2. parse arg argument
  3.  
  4. signal on error
  5. signal on syntax  name syntax
  6. signal on halt    name halt
  7. signal on failure name failure
  8. '@echo off'
  9. 'cls'
  10. say
  11. say 'TestMulT --- Testing REXXGDB2.DLL In A Multi-threaded environment'
  12. say 'Simon Husin (husin@ibm.net)'
  13. say 'Kent, Washington, U.S.A., Jul 1996 - Aug 1997'
  14. say
  15.  
  16. /*
  17. RXU Courtesy Dave Boll of Ford Credit (e-mail: usfmcfkf@ibmmail.com)
  18.  
  19. RXU is a freeware DLL with lots of quality and useful REXX functions for
  20. OS/2 which can be found on OS/2 BBSes near you or on the Internet under
  21. the name of RXUnn.ZIP.
  22.  
  23. This program was tested with functions found in RXU19.ZIP.
  24. */
  25. if rxfuncquery('RxCreateRexxThread') then
  26.    call rxfuncadd 'RxCreateRexxThread', 'RXU',      'RxCreateRexxThread'
  27.  
  28. /*
  29. Load all OS/2 PL/2 REXX Utilities in REXXUTIL
  30. */
  31. if rxfuncquery('sysloadfuncs') then do
  32.    call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  33.    call sysloadfuncs
  34.    end
  35.  
  36. if rxfuncquery('g2LoadFuncs') then do
  37.    say
  38.    say 'Loading REXXGDB2 Functions...'
  39.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  40.    say 'Result =' g2LoadFuncs()
  41.    end
  42.  
  43. call time 'R'
  44. say 'Connecting to SAMPLE database...'
  45. call g2connectreset
  46. call g2connectshare 'SAMPLE'
  47. say 'Execution time    ' time('E') / 1
  48. say
  49. say copies('~', 78)
  50. say center('*** TESTMULT TESTS STARTED ***', 78)
  51. say
  52. say copies('~', 78)
  53. do forever
  54.    do ix = 1 to argument
  55.       say 'Launch Thread'ix'...'
  56.       call rxcreaterexxthread 'Thread'ix
  57.       end
  58.    call syssleep 5  /* Take a break for 5 seconds        */
  59.                     /* TestMult in another session can   */
  60.                     /* gain some CPU cycles this way...  */
  61.    end
  62. return 0
  63.  
  64.  
  65.  
  66. error:
  67. say 'Error detected on line' SIGL
  68. return 10
  69.  
  70. syntax:
  71. say 'Syntax error detected on line' SIGL
  72. return 20
  73.  
  74. halt:
  75. say 'Halt error detected on line' SIGL
  76. return 30
  77.  
  78. failure:
  79. say 'Failure error detected on line' SIGL
  80. return 40
  81. return
  82.