Date: Tue, 3 Feb 2009 08:33:11 -0600
Reply-To: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: close dos window
In-Reply-To: <809c343e-c5b9-41ac-b74f-9d26105d347f@u18g2000pro.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Perhaps you could change the way you execute the system command(s)
such that you can manipulate the output into a report that is more
friendly and does not require multiple command prompt windows.
For the kind system commands that I usually execute from a SAS program
I find the PIPE access method to be the most useful. You can execute
any number of commands in one data step and retrieve the output and
process it as needed. I also find that sending STDERR 2>&1 to STDIN
is helpful for processing commands that may not execute as expected.
This is a simple example that doesn't do anything interesting with the
output. If you provide an example perhaps we could suggest ways to
help you get the output you need without ever seeing a singe command
prompt window.
data _null_;
length command $256;
command = catx(' ','DIR /S/B',quote(strip(pathname('WORK'))),'2>&1');
putlog 'NOTE: ' command=;
infile dummy pipe filevar=command end=eof;
do _n_ = 1 by 1 while(not eof);
input;
putlog _n_ z3. +1 _infile_;
end;
stop;
run;
On 2/3/09, ash007 <RamsamyAshley@gmail.com> wrote:
> thanks.
>
> the problem is that at the end of the execution of the sas pgm, there
> are a lot of dos window open - so I read them then I want a sas pgm to
> execute that will close them all.
>
> ash007.
>