LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 28 Feb 2008 17:07:21 +0530
Reply-To:     ajay ohri <ohri2007@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         ajay ohri <ohri2007@GMAIL.COM>
Subject:      Re: How to execute a DOS command without the command window
Comments: To: "Richard A. DeVenezia" <rdevenezia@wildblue.net>
In-Reply-To:  <1Rwxj.28$lp3.31776@news.sisna.com>
Content-Type: text/plain; charset=ISO-8859-1

how about creating a simple batch file with all the DOS commands and using SAS to just open that file.....you can even call an excel file with a VBA macro that calls the batch file ?

regards,

ajay

On Thu, Feb 28, 2008 at 4:55 PM, Richard A. DeVenezia < rdevenezia@wildblue.net> wrote:

> "data _null_," wrote: > > For "silent" execution of DOS commands turn to SYSTASK. No need to > > concern yourself with XWAIT or XSYNC; > > > > systask command 'erase path\name.ext'; > > Actually you should concern yourself with waits. > > SYSTASK by default launches with a NOWAIT criteria. > If the task being launched can impact the next serial action of the SAS > program (and often they do), the SAS session should wait until the task is > completed. > > Suppose the task launcher was delayed and the SAS program wrote to > "name.ext", which it would then email somewhere. > Without waiting, the sequence would be: write, delete, email, error > > See the SYSTASK documentation for all the gory details. > In the docs there is this peculiar statement > "Unlike the X statement, you cannot use the SYSTASK statement to start a > new > interactive session." > > I find this disclaimer untrue, as evidenced by submitting > SYSTASK COMMAND "sas.exe"; > > Sometimes the command you want to issue, in the simplest form, is > START <something> > <something> can be a .exe or a typed file with a default Windows Explorer > open action (such as xyz.html) > > When the SYSTASK command being launched is > START <something> > Control will return immediately to the SAS session from the start > launcher. > > The start launcher can be made to wait for the launchee to complete by > using > the /WAIT option > START /WAIT <os-command> > > So, the whole enchilada could be > SYSTASK command "START control-file-used-for-sas-inputs.xls /WAIT" WAIT > taskname=inputsready; > WAITFOR inputsready; > > > -- > Richard A. DeVenezia > http://www.devenezia.com/ >


Back to: Top of message | Previous page | Main SAS-L page