Thursday, July 9, 2009

Close many VIEWTABLES at one time

In SAS DMS, I always view the dataset using Viewtable.
It is boring to close many viewtables before rerun the pgm.

I ever asked for help on comp.soft-sys.sas newsgroup. However, I am not satisfied with the answers.
Today, an idea rushed my mind. I have tried and believe it is a wonderful tip. :)

Here are the steps:
1. Define command style macro %closevts and save as closevts.sas

%macro closevts / cmd;
%local i;
%do i=1 %to 20;
next "viewtable:";end;
%end;
%mend;

2. Update configuration file

-cmdmac
-set sasautos (
.......
macro-%closevts-path
)

3. Issue %closevts in command line

No comments: