BookmarkSubscribeRSS Feed
diane74
Calcite | Level 5

Hi SAS Community, 

 

I would like to ask about %sysexec command, is it only used for opening automatically excel files? because it didn't work with me when i used it for openning an access file and a word file.

 

Thanks

 

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Manual:

http://documentation.sas.com/?docsetId=mcrolref&docsetTarget=n08ecabbpebv2xn13ieu8uylrohm.htm&docset...

 

%sysexec - this command is used for sending Operating System commands to the Operating System and getting results back if used in that way.  Anything you can do in the command line can be sent via this macro function.

 

The real question here would be why you are using this function when you don't know what it is for?  Why are you "opening an access file and a word file"?  Are you perhaps using the ancient DDE system?  If so, move to a modern import/export process.

ballardw
Super User

"Didn't work" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

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