Date: Tue, 21 Oct 2008 01:28:05 -0700
Reply-To: Rune Runnestø <rune@FASTLANE.NO>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rune Runnestø <rune@FASTLANE.NO>
Organization: http://groups.google.com
Subject: Problem with reading a file into a data set
Content-Type: text/plain; charset=ISO-8859-1
Hi,
The macro %DS2CSV creates a file on disk from a well-know data set.
The following data step B tries to read this file into a data set, but
fails. There are no error messages in the log. But the result is not
right. Somehow I have to make SAS ignore the "" as ordinary signs when
reading the file. But how?
Rune
%ds2csv (
data= sashelp.class,
runmode=b,
csvfile=d:\temp\sashelp_class.txt,
labels = N,
colhead = Y,
sepchar = 3C,
formats = Y
);
DATA B;
INFILE 'd:\temp\sashelp_class.txt' dsd dlm = '<' truncover LRECL
= 1000 ;
INPUT
Name $8.
Sex $1.
Age $2.
Height $4.
Weight $4.
;
RUN;
|