BookmarkSubscribeRSS Feed
cjohnson
Obsidian | Level 7
I am running SAS 9.1, EG 4.1. I am trying to execute a vbscript from code in SAS EG. I can not use the x or call system command. Is there any way that I can write VBSCRIPT code in SAS and execute or call a vbscript file on my local computer to run without causing my SAS administrator work?
Christopher Johnson
www.codeitmagazine.com
4 REPLIES 4
Patrick
Opal | Level 21
Where is SAS running (the SAS server): On your local machine or a remote one?

Can you execute SAS code in batch on this machine?

I believe for EG sessions (object spawner) the option noxcmd is the default. That's why you can't use shell escape commands like 'x'. I also believe the default for SAS batch processing is xcmd.

As EG is only the client: Make sure your VBSCRIPT file is where the SAS server is.

For more ideas: Please explain a bit more what you want to achieve and what you have.

HTH
Patrick
cjohnson
Obsidian | Level 7
SAS is running on a remote server. Not quite sure what you mean by execute SAS code in batch. I can submit code, and it runs on the server.

Here is what I want to accomplish. I have data on my local machine, on the SAS server, and on another server. I would like to be able to manipulate files in all these places from within SAS to automate processes. Right now, I can import files from either server because I use absolute addresses, but I can't import from my local computer. Doesn't seem to recognize c:\ as a drive, but maybe this is a seperate problem.

I have vbscript files written to copy and rename monthly csv files, clear log files, etc. I would like to be able to do this through SAS. My SAS administrator is not an expert, so I would like to avoid having to explain to him how to remove the noxcmd option if possible.
Christopher Johnson
www.codeitmagazine.com
ChrisHemedinger
Community Manager
See if this blog entry helps:

http://blogs.sas.com/sasdummy/index.php?/archives/136-Using-the-X-and-SYSTASK-commands-from-SAS-Ente...

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

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
  • 4 replies
  • 3271 views
  • 0 likes
  • 4 in conversation