4

to open a table in SAS we can use the DM "VT {tablename}" command.

What is the equivalent command to CLOSE the viewtable window???

Allan Bowe
  • 12,306
  • 19
  • 75
  • 124

1 Answers1

6

Well... this command will close the viewtable window (replace {libref.dataset} with your data), but submitting it repeatedly will continue closing other viewtable windows that might also be open so you might want to tweek it a bit if that's an issue.

dm 'next VIEWTABLE:libref.dataset; end;';
cmjohns
  • 4,465
  • 17
  • 21
  • 1
    Just what I needed - thanks. Ville - the code below will close all windows if submitted repeatedly: – Allan Bowe Aug 10 '09 at 12:15
  • 1
    You could also enclose it in a macro like this (credit to http://sasrunner.blogspot.com/ for this tip ) %macro closevts / cmd; %local i; %do i=1 %to 20; next "viewtable:";end; %end; %mend; – cmjohns Aug 10 '09 at 13:38
  • Assign `next viewtable;winclose` to a function key (I use F12)... hitting it repeatedly will close all open viewtables, one after the other. – Jason V Nov 14 '15 at 03:18