This example might help:

   out.0 = 0   -- create the stem
pdest = .error~destination(.trapout~new(out.)) -- redirect .error output to the stem
  trace i   -- trace output goes to .error
  a = 1
  b = 2
  c = a+b
  trace o   -- end the trace
  do s=1 to out.0   -- display trace output
    say out.s
  end
  .error~destination  -- back to normal destination for .error
  exit

::class trapout public

::method init
  expose stem
  use arg stem


::method unknown
  expose stem
  use arg msg, text
  stem[0] += 1
  index = stem[0]
  stem[index] = text~makeString



On 7-2-2014 7:56, Roger Bilau wrote:
Hello,

on the mainframe it is possible to trap the messages from a TSO command to a
stem variable with the outtrap command.

On DOS I could redirect the messages with '>' to a file, but it would be
much more comfortable if there is a similary way.

I read the information about .stderr, .stdin, .stdout in the rexx reference
guide, but didn't really understand it and couldn't

found samples, to get closer.

If it is possible, short sample code would be helpful.

Regards

Roger




------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users


--
Ruurd Idenburg

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to