SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Krueger
Pyrite | Level 9

Hello all I'm running the following code:

 

%sysexec( copy "\\uncpath\file.xlsm"
               "\\uncpath\file.xlsx" ) ;

Proc export data = want
	outfile = "\\uncpath\file.xlsx";
	Dbms = Xlsx replace ; 
	sheet='sheet 1';
run ; 
%sysexec( copy "\\uncpath\file.xlsm"
               "\\uncpath\file.xlsx" ) ;

The above works fine, but I do get a prompt for each %sysexec() command I run. 

image.png

 

Is there a way to hide this cmd.exe window? It copies my .xlsx sheet to my .xlsm sheet just fine but I'm trying to automate this to run on it's own and currently I have to close out of this window each time. I haven't been very successful in finding a way to prevent this thus far. Any help would be appreciated.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
options noxwait noxsync;

It's one of those, can't remember which does what though.

View solution in original post

4 REPLIES 4
Reeza
Super User
options noxwait noxsync;

It's one of those, can't remember which does what though.
Krueger
Pyrite | Level 9
Noxsync took care of the cmd.exe prompt and the windows prompt that shows up. FCOPY for some reason corrupted both of my files. Maybe there was something else to it though?

Thanks
Reeza
Super User
You could also use FCOPY to avoid the issue and have the code be system agnostic.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 4 replies
  • 2145 views
  • 2 likes
  • 2 in conversation