Date: Fri, 26 Jul 2002 14:03:41 -0400
Reply-To: Ed Heaton <EdHeaton@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ed Heaton <EdHeaton@WESTAT.COM>
Subject: Re: Help--import raw data to sas data set
Content-Type: text/plain
Richard,
This is not an answer to your problem, but a warning. Be very careful of
the use of the
8.2 informat. First of all, it has no effect if your input has a decimal
point. Secondly, it will divide any integer by 100 when input.
Ed Heaton
#4818
TA-2018
-----Original Message-----
From: Richard M. Smith [mailto:rmsmith@POBOX.COM]
Sent: Thursday, July 25, 2002 4:37 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Help--import raw data to sas data set
Hello All:
I can't recall how to control the input column pointer; simply too many
languages over the years! Anyway, the data set reads like a book, upper left
corner toward the lower right corner. Raw data follows:
00004.03 00004.03 00004.03 00004.03 00004.03 00004.03
00004.03 00004.03 00004.04 00004.03 00004.02 00004.02
00004.03 00004.03 00004.03 00004.03 00004.03 00004.04
00004.04 00004.04 00004.05 00004.04 00004.04 00004.04
00004.04 00004.04 00004.03 00004.04 00004.04 00004.03
00004.04 00004.04 00004.04 00004.03 00004.03 00004.03
00004.03 00004.03 00004.05 00004.05 00004.05 00004.05
00004.03 00004.03 00004.04 00004.04 00004.04 00004.04
00004.04 00004.04 00004.04 00004.04 00004.05 00004.05
The following code only reads the first column, but I need the code to read
*across* the first row before advancing to the next line of data:
%let site=dataset;
%let dyr=sastemp;
filename in1 "d:\temp\dataset.txt";
data sastemp.dataset;
infile in1;
input @1 uslev 8.2 @11 uslev 8.2 @21 uslev 8.2 @31 uslev 8.2 @41 uslev
8.2 @51 uslev 8.2;
format uslev 8.2;
run;
proc fsview;
run;
The resulting sas data set should only have one variable. Thanks!
--
Sincerely,
Richard M. Smith, Civil Engineer
U.S. Bureau of Reclamation
PO Box 815/32 C Street NW
Ephrata, Washington 98823
(509) 754-0200 main
(509) 754-0259 desk
rsmith@pn.usbr.gov
rmsmith@pobox.com