LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 26 Jul 2002 00:24:26 -0400
Reply-To:     "John J Genzano, III" <jgenzano@GENZANO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "John J Genzano, III" <jgenzano@GENZANO.COM>
Subject:      Re: Help--import raw data to sas data set
Comments: To: rmsmith@pobox.com
In-Reply-To:  <2jn0ku4f8th133988fsq1ub5gau8l2hb81@4ax.com>
Content-Type: text/plain; charset="US-ASCII"

Richard,

Try this and see if it works:

filename in1 "d:\temp\dataset.txt";

data sastemp.dataset; infile in1; input uslev:8.2 @@; format uslev 8.2; run;

proc fsview; run;

It should work although I haven't tested it.

John J Genzano, III Principal Consultant Genzano Software Consulting 610-517-2591 SAS Certified Professional, V6

I have never in my life learned anything from any man who agreed with me. - Dudley Field Malone

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Richard M. Smith 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


Back to: Top of message | Previous page | Main SAS-L page