Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making STDOUT mute

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

Hi,

I'm writing a script, Master.rexx, which call another one, Slave.rexx. Slave makes somme ouputs I don't want (I just want to see Master's ouputs). So, in Master.rexx, I would like to do something like :

...
Making STDOUT mute
CALL Slave.rexx
Restore STDOUT
...

Can you help me ?

Thank's !!

Philippe
 
Philippe,

Try this...

x = OUTTRAP(dummy.)
call Slave.rexx
x = OUTTRAP('OFF')
drop dummy.


Note that this stops some but not all messages, which are sent to a terminal. Messages from the WTO or TPUT macros will still appear.

Hope this helps.

Cheers,
Dave.

Mailto: dave.ring@barclays.co.uk
 

Hi Dave,

Thank's for your help. It would have been really hard to discover this by myself... Unfortunatly, interpreters I use (IBM Object Rexx V1.0... and Regina) doesn't seem to know OUTTRAP. Object Rexx Reference Manual doesn't speak about it too.

After I've seen your message and realized OUTTRAP couldn't work on my machine, I've looked for OUTTRAP on the web... Many programs use it as it was a usual command... Why can't I use it ?

Thank you,

Philippe
 

All done ! I've used another solution. Here the first line I've written :

myResult = MyScript.rexx("my params")
SAY "Returend value : " myResult

So MyScript's outputs were displayed. I've changed this for :

"REXX MyScript.rexx my params >NUL"
myResult = rc
SAY "Returned value : " myResult

... so I use "DOS OUTTRAP function", ">NUL"...

Philippe
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top