BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26

Can I issue a DOS command in SAS by using the X command, in such a way that the resulting DOS window is either minimized, or doesn't pop up at all? Windows 7 Professional, 64 bit, SAS 9.3

Thanks.

--
Paige Miller
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

System option XMIN sounds like what you are looking for.

options xmin;

View solution in original post

6 REPLIES 6
data_null__
Jade | Level 19

I think there are some options for that but I like using the PIPE access method to execute DOS commands.

command='DIR /s';

infile dummy pipe filevar=command .....;

You can then read the output from DIR into a data set.

You can also look at SYSTASK COMMAND to execute DOS commands.

Generally I don't like X.

PaigeMiller
Diamond | Level 26

Are you saying (implying) that if I use the Pipe access method, no DOS windows pops up? Because in this particular instance, I don't really need the features you mention.

--
Paige Miller
data_null__
Jade | Level 19

Yes.  And you don't have to worry about xmin xwait xsysn etc.

ballardw
Super User

System option XMIN sounds like what you are looking for.

options xmin;

PaigeMiller
Diamond | Level 26

Thanks! Often, finding the right option isn't easy through documentation, its much easier to ask.

--
Paige Miller
Ksharp
Super User

Or another option maybe you like.

options noxwait ;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 6 replies
  • 3472 views
  • 3 likes
  • 4 in conversation