BookmarkSubscribeRSS Feed
Sabharish
Fluorite | Level 6

Hi All,

 

I need to run (.vbs) file in sas eg. But i couldn't run it through sas eg. I can only run the same .vbs file out of sas.

 

Any help will be most appreciated.

 

Thanks in Advance.

 

 

3 REPLIES 3
Kurt_Bremser
Super User

SAS Enterprise Guide uses a so-called workspace server for running all the code it creates. This workspace server is configured per default to not allow external commands. It also might reside remotely and on a non-Windows operating system.

 

Please post the log of your failed step.

Sabharish
Fluorite | Level 6
Thanks for the above Info.

I'm not getting any error in the log. when i just run the .vbs file using x cmd its not executing only for .vbs file inside SAS EG session. I can run the .vbs file outside the SAS EG session using cmd prompt.
Kurt_Bremser
Super User

Instead of using the x statement, do this to call your external command:

filename oscmd pipe "your_vbs_call 2>&1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

This will write all answers from the operating system to the SAS log.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 3 replies
  • 1385 views
  • 0 likes
  • 2 in conversation