BookmarkSubscribeRSS Feed
PhilfromGermany
Fluorite | Level 6

Hi guys, I am trying to use an x command to open/run a vbs script. The command is simply: options noxsync noxwait; x "F:\SAS_USER\myname\SAS2script\ext_files\VBS_TEST.vbs"; The VBS script is supposed to move data from a csv file to an excel work book and then run a macro. You can tell that it partially works, because an Excel process is started in the background. However, this excel process doesn't doesn't run any macros. When I run the very same command using command prompt, everything works fine. Has anyone ever experienced anything like this (script working in command prompt but not in SAS)? Thanks!

3 REPLIES 3
art297
Opal | Level 21

Phil: Since you indicate that it will run correctly from the command prompt, I can think of one alternative that would be easy to test, namely putting the command (to run the vb script) in a .bat file and using the x command to run the .bat file.

PhilfromGermany
Fluorite | Level 6

Thanks for your response, Arthur. I tried running the batch file with the command to run the vbs script, but it still isn't working. Then I tried the same thing in SAS Base (I walys use Enterprise Guide) and it worked. I was able to run both, batch file and vbs script directly via X command using SAS Base. So it looks as if something is blocking x commands in Enterprise Guide.

BTW: I already allowed XCMD on the workspace server.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 5143 views
  • 0 likes
  • 2 in conversation