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.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/