DATA Step, Macro, Functions and more

X command where DOS window is minimized?

Accepted Solution Solved
Reply
Trusted Advisor
Posts: 1,911
Accepted Solution

X command where DOS window is minimized?

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.


Accepted Solutions
Solution
‎06-15-2012 10:46 AM
Super User
Posts: 11,343

Re: X command where DOS window is minimized?

Posted in reply to data_null__

System option XMIN sounds like what you are looking for.

options xmin;

View solution in original post


All Replies
Respected Advisor
Posts: 3,799

Re: X command where DOS window is minimized?

Posted in reply to PaigeMiller

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.

Trusted Advisor
Posts: 1,911

Re: X command where DOS window is minimized?

Posted in reply to data_null__

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.

Respected Advisor
Posts: 3,799

Re: X command where DOS window is minimized?

Posted in reply to PaigeMiller

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

Solution
‎06-15-2012 10:46 AM
Super User
Posts: 11,343

Re: X command where DOS window is minimized?

Posted in reply to data_null__

System option XMIN sounds like what you are looking for.

options xmin;

Trusted Advisor
Posts: 1,911

Re: X command where DOS window is minimized?

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

Super User
Posts: 10,020

Re: X command where DOS window is minimized?

Posted in reply to PaigeMiller

Or another option maybe you like.

options noxwait ;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 614 views
  • 3 likes
  • 4 in conversation