Date: Tue, 7 Jan 1997 00:33:25 -0500
Reply-To: unix <chenxi@UTKUX.UTCC.UTK.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: unix <chenxi@UTKUX.UTCC.UTK.EDU>
Subject: Re: data set problem
Content-Type: TEXT/PLAIN; charset=US-ASCII
Tim:
There is a way you can read in the data. At first, read
everything as chracter string, use substr or scan to detect
if num1/num2 contains (), if there is, use length and
substr to get rid of them, then times 1 to convert them into
numerical. Hope it helps.
Chen Xi, Ph.D
PharmClint Co.
==========================================
Hi SAS users,
I use 'comma' format to read a variable which is at the
end of a record. The data set is saved as a space delimited
text file from Excel. This file is like:
.........+.........+.........+.........+
Mary 646 Green St. 50.01 556.44
John 8766 Gray Av. (56.3) 75.98
Jack 12 Marion Rd. 6.77 (45.62)
...
*********
If I use the following format, (45.62) can not be read in, that is,
the value is missing.
@1 name $4
@8 address $13
@21 num1 comma9.2
@30 num2 comma9.2;
*********
If I use comma10.2 instead, both 556.44 and 75.98 cannot be read in.
Any idea?
Thanks!
Tim
|