home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv7.zip / vac22os2 / ibmcobol / macros / iwzmtrc.lx < prev    next >
Text File  |  1997-12-17  |  2KB  |  63 lines

  1. /* REXX */
  2. trace off;
  3. signal on novalue;
  4. parse source opsys rest;
  5. if opsys = 'OS/2' then
  6.   do;
  7.   call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs';
  8.   call SysLoadFuncs;
  9.   end;
  10. parse arg theargs;
  11. theargs = strip(theargs,'B','"');
  12. parse var theargs qname message '\\\\' variables;
  13. if substr(message,1,1) = '+' | substr(message,1,1) = '-' then
  14.   do;
  15.   message = substr(message,2);
  16.   nostop = substr(message,1,1);
  17.   end;
  18. else
  19.   nostop = '';
  20. 'extract docnum into docnum';
  21. 'godoc name M:\Remote ECD Trace';
  22. 'bottom';
  23. 'extract recording into recording';
  24. 'set recording off';
  25. 'insert' message;
  26. 'msg' message;
  27. if variables <> '' then
  28.   'insert                         ' variables;
  29. 'set recording' recording;
  30. 'sshow';
  31. reply = '';
  32. if nostop = '' | nostop = '+' then
  33.   do;
  34.   'extract global.iwzmtrc into iwzmtrc';
  35.   parse var iwzmtrc request arg;
  36.   select;
  37.     when request = 'stop' | nostop = '+' then
  38.       do;
  39.       say 'Enter REXX statement or press Enter to continue';
  40.       parse pull reply;
  41.       parse var reply arg1 rest;
  42.       if translate(arg1) = 'SAY' then
  43.         reply = "call iwzmtrc.cmd tracemod'\'whoami '-'iwz_trc_message'\\\\'"rest;
  44.       end;
  45.     when request = 'wait' then
  46.       do;
  47.       if arg = '' then
  48.         arg = 1;
  49.       xx = SysSleep(arg);
  50.       end;
  51.     otherwise
  52.       nop;
  53.     end;
  54.   end;
  55. 'godoc docnum' docnum;
  56. if qname <> '*' then
  57.   do;
  58.   oldq = RxQueue('Set',qname);
  59.   push reply;
  60.   xx = RxQueue('Set',oldq);
  61.   end;
  62. exit 0;
  63.