Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: save output

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: save output
Date   Tue, 20 Aug 2002 15:10:24 +0100

Philip Greenwood

> I'm wondering if there is a way save the entire output of 
> any given command to, say, a macro. 
> (I am writing an ado file that runs commands on multiple 
> datasets and would like to be able to suppress output as in 
> -quietly-, but then re-display it with a message that is 
> particular to each dataset - but only if the given command 
> produces an output!)

You could accumulate output as a long string of characters
in a macro, punctuated by SMCL directives. The limits are
documented under -help limits-. 

Alternatively, you could route output using -file- as lines of 
text to a file and -type- that only under certain conditions. 
Again, SMCL directives would make that most attractive. 

Without knowing more about your problem, however, 
I suspect that there are more direct ways to tackle this. 

[email protected] 
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index