home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor2.zip / DISK_10 / IMAGE9.ZIP / TRACEON.CMD < prev    next >
OS/2 REXX Batch file  |  1993-06-30  |  2KB  |  52 lines

  1. /****************************************************************************
  2.  *                       COU Administrator Trace Tool                       *
  3.  ****************************************************************************
  4.  *                    Licensed Materials-Property of IBM                    *
  5.  *               5604-472 (c) Copyright IBM Corporation, 1993               *
  6.  *                           All rights reserved.                           *
  7.  *                 US Government Users Restricted Rights -                  *
  8.  *                Use, duplication or disclosure restricted                 *
  9.  *               by GSA ADP Schedule Contract with IBM Corp.                *
  10.  ****************************************************************************
  11.  * Version 1.0 - 8 Jun 93                                                   *
  12.  ****************************************************************************/
  13. trace 'O'
  14. parse upper arg TraMode ., SysList
  15. if TraMode = '?'
  16.   then signal Tell
  17. if TraMode = ''
  18.   then TraMode = '?I'
  19. if SysList = ''
  20.   then TraceMe = (value('COU.TRACE',,'OS2ENVIRONMENT') value('CORE.TRACE',,,
  21.       'OS2ENVIRONMENT') <> '')
  22.   else TraceMe = (wordpos(word(rxuserinfo(), 2), SysList) > 0)
  23. if TraceMe
  24.   then exit TraMode
  25.   else exit 'O'
  26.  
  27. Tell:
  28. say
  29. say 'TRACEON - Administrative Trace Tool'
  30. say
  31. say 'TRACEON can be used to turn tracing on in a REXX program for selected'
  32. say 'systems without affecting any other user that might run the program.'
  33. say
  34. say 'Form 1:  call value traceon([tracemode])'
  35. say 
  36. say 'Sets tracing to "tracemode" if the environment variable COU.TRACE or'
  37. say 'CORE.TRACE is set to anything.  If not specified, "tracemode" defaults'
  38. say 'to "?I".'
  39. say
  40. say 'Form 2:  call value traceon([tracemode], systemlist)'
  41. say '*** LAN Server only ***'
  42. say
  43. say 'Sets traceing to the specified mode if the current machine name is'
  44. say 'specified in the systemlist.'
  45. say
  46. say 'Examples:'
  47. say '  call value traceon()'
  48. say "  call value traceon('R')"
  49. say "  call value traceon('?E', 'VESUVIUS MACH2 MYSYS')"
  50. say "  call value traceon(, 'VESUVIUS MACH2 MYSYS')"
  51. exit 0
  52.