BookmarkSubscribeRSS Feed
skcussas
Fluorite | Level 6

Hi everyone,

 

Is it possible to clear log, clear output, close all viewtable and run the script in one key (dmkey)?

I currently define my F3 as

 

clear log; clear output; submit;

 

which is not able to close all viewtables.

 

 

Thanks for your help.

3 REPLIES 3
ballardw
Super User

The VT window has it's own KEYS entry so I don't think you are going to be able to submit commands to the VT window from the main Keys that are not related to the initial opening of the VT window.

Tom
Super User Tom
Super User

You could just hard code a number of them.

clear log; clear output; next viewtable; end; next viewtable; end; pgm ; submit;

You might have to experiment with a command macro to see if you could get it to figure how many need to close.  Also might need to change the PGM command if you are using PC-SAS and the Enhanced (sic) Editor.

ballardw
Super User

@Tom wrote:

You could just hard code a number of them.

clear log; clear output; next viewtable; end; next viewtable; end; pgm ; submit;

You might have to experiment with a command macro to see if you could get it to figure how many need to close.  Also might need to change the PGM command if you are using PC-SAS and the Enhanced (sic) Editor.


I needed to use

log; clear; output; clear; next viewtable; end;

to clear the log and output. And yes WPGM instead of PGM for enhanced editor.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 8526 views
  • 0 likes
  • 3 in conversation