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 .

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

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