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 (October 2006, 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 Oct 2006 14:27:48 -0500
Reply-To:     Yu Zhang <zhangyu05@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Yu Zhang <zhangyu05@GMAIL.COM>
Subject:      Re: create more thanone row fomr each line of input
Comments: To: illusion <mdasifg@yahoo.com>
In-Reply-To:  <1161026501.648880.287160@k70g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

*illusion,* ** *Here is one of the solution for your question. * ** *HTH* *Yu* ** *data* wafer;

infile cards missover;

retain treat;

input treat @;

do while (*1*);

input count @;

if missing (count) then leave;

else output;

end;

cards;

0 8 7 6 6 3 4 7 2 3 4

1 9 9 8 14 8 13 11 5 7 6

;

*run*;

On 10/16/06, illusion <mdasifg@yahoo.com> wrote: > > hello everyone... > this is something i am trying to do to learn more about input > statement. > if somebody can help me.. i would appreciate it. > lets say i have txt file with each line as > studentid score > 1 92 95 89 > 2 94 90 95 > > > how would i read in the above txt file as sas dataset in the follwoing > format > id score > 1 92 > 1 95 > 1 89 > 2 94 > 2 90 > 2 95 > > > Thank you in advance > illusion >


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