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 (June 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Jun 1997 15:15:15 PDT
Reply-To:     Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Subject:      Re: Input Routine Problem

Bob Hess <atrth@ASUVM.INRE.ASU.EDU> writes: >I have a data set derived from the output of a test analysis program that >produces a series of scores. The data is actually 48 distinct sets of >school information (1 per school). The first five lines are garbage ASCII >report comments but beginning in the sixth line is the data (four columns >worth). This data runs for 65 lines and then is repeated for the next >school, i.e., 5 lines of comments followed by 65 lines of 4 columns of real >data. And so on until the 48 schools are reported in the file. >I need to read this data into a SAS data set to merge it with later >information. I know I need to run a set of loops but can't seem to find a >way to remove the five lines of garbage that precede each set of data in >the file. Any suggestions?

DATA; INFILE something; DO SCHOOL = 1 TO 48; DO GARBAGE = 1 TO 5; INPUT JUNK $1.; DROP JUNK; END; DO LINES=1 TO 65; INPUT V1-V4; /* INFORMAT ??? */ OUTPUT; END; END; STOP; RUN;


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