@hartwell wrote:
Here's the table produced by printing sashelp.vdest, which I don't think is enough info for me to restore their defaults after I exclude everything.
It is enough for the code you showed since all you needed to know was the value of the DESTINATION variable to generate your two statements.
ods rtf exclude all;
ods rtf select all;
So assuming you want to first prevent output from going to the active destinations you could do something like:
data _null_;
set sashelp.vdest;
where dest ne 'OUTPUT';
call execute(catx(' ','ods',destination,'exclude all;'));
run;
Then add a similar step at the point where you want to start sending output their way again.
I think you are getting confused and thought you would need to recreate the original ODS statement that defined the destination. You would only need to do that if had run this command:
ods rtf close;
And if your question meant that someone else had closed the RTF destination before your code ran then the only way to recreate it is to be like Big Jule in Guys and Dolls and "remember where they once was."
... View more