BookmarkSubscribeRSS Feed
scheme2121
Calcite | Level 5
My following commands are no longer working now. I am not sure what is causing the problem. I got recently installed hotfix for SAS Enterprise Guide and upgraded microsoft office. I did test with simple SAS statement as below. I did not get an error message and did not create directory either. There statements are working fine a few weeks ago. Any suggestions. Thanks.

filename fileref PIPE ‘a DOS command’;
%SYSEXEC Statement

for example,
Filename fileref PIPE ‘mkdir “c:\a dir”’;
Data _null_;
Infile fileref;
Input ;
Put _infile_;
Run;
1 REPLY 1
darrylovia
Quartz | Level 8
General submitting shell commands x piping etc... are turned-off in EG. But if system option –ALLOWXCMD is turned on you can do that. Maybe when the hotfix was applied this options was deactivated.

there is a work around using the MODULE function, below is a paper that I wrote that shows how to create directiory by accessing the Windows API directing.

http://analytics.ncsu.edu/sesug/2010/CC06.Putnam.pdf

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 846 views
  • 0 likes
  • 2 in conversation