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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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