Date: Thu, 7 May 1998 16:17:02 -0700
Reply-To: Jedd Parker <JeddParker@FAIRISAAC.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jedd Parker <JeddParker@FAIRISAAC.COM>
Subject: X or System call in UNIX challenge
Content-Type: text/plain
Greetings,
I have a program that creates an empty file, then in a data step creates
5 ASCII files with different data depending on the by variable. I would
like all this to go into one file with all info on each by variable
grouped together.
My code looks like this:
x "echo ' ' > empty.file;
data _null_;
set somedata;
by byvar;
file 'file1';
put 'some junk';
file 'file2';
put 'some more junk';
if last.byvar then do;
file 'file1';
put 'end of file';
file 'file2';
put 'end of file';
call system("cat file1 file2 >> empty.file");
call system("rm -f file1 file2 ");
end;
run;
This all works fine, except for the cat command. I have tried "more"
and that does not work. The rm command works fine.
This is running SAS 609 on a SUN UNIX box.
One great brownie recipe to the person who can tell me why this does not
work, and what to do to make it work.
-------------------------------------
Jedd L. Parker
SAS Programmer/Analyst
Fair, Isaac and Company
(415) 472-2211 ext. 1318
---------------------------------------