BookmarkSubscribeRSS Feed
dennis_oz
Quartz | Level 8

Hi Folks,

can I ask you a question ..

There is a  solution that is available in SAS :- https://support.sas.com/kb/26/065.html

 

Can I execute a DOS command like an X command through SAS to acheive the above purpose.

If so how?

 

Appreciate any guidance.

 

Regards,

Dennis

 

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Yes you can. 

Do you have a DOS program that does this though?

If not, why not use the solution provided?

 

andreas_lds
Jade | Level 19

Depends on the settings in your environment, to execute dos commands, your sas session must run an windows machine and the option xcmd must be enabled.

Ksharp
Super User
Yes. you can.
Make a BAT file like this :

"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -nosplash -sysin "D:\RTF\setup.sas" -log "D:\RTF\t_14_3_4_other.log"

And execute it under DOS .
BTW, “setup.sas" is the code you posted or written by your hand .

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 920 views
  • 0 likes
  • 4 in conversation