Date: Tue, 1 Jun 2010 21:52:29 -0500
Reply-To: Sudo Ku <crafty876@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sudo Ku <crafty876@HOTMAIL.COM>
Subject: Infile/Cards strings with more than one space
Content-Type: text/plain; charset="iso-8859-1"
Hi I have the following raw data that I would like to read in. Each question has 20 lines. On the first line I have some descriptive statistics for the results of a poll. The following lines (2 through 6 are the) 5 possible votes that can be selected. What I am struggling with is that on lines 2-6 are the tab delimited voting 'signatures' of the persons that made each selection. I had figured that the easiest way to deal with these values was to treat them as a string in this stem and parse out counts or patterns later. My only problem is that there is more than a single space (it's a Tab, '09'x) between each value and so SAS will only grab the first number.
I figure there is probably a simple solution to this but it is not as simple as a double &&.
Any help would be much appreciated.
Thank You,
Kevin
data Raw_Ratings
infile cards;
input #1 Item Dim Mean Median SD Count Time_Date & $25.
#2 d1 @9 STRV1 && $120.
#3 d2 @9 STRV2 && $120.
#4 d3 @9 STRV3 && $120.
#5 d4 @9 STRV4 && $120.
#6 d5 @9 STRV5 && $120.
#7 d6 @5
#8 d7 @5
#9 d8 @5
#10 d9 @5
#11 d10 @5
#12 d11 @5
#13 d12 @5
#14 d13 @5
#15 d14 @5
#16 d15 @5
#17 d16 @5
#18 d17 @5
#19 d18 @5
#20 d19 @5
;
cards;
1 1 3.83871 3.846154 0.8070965 31 26/05/2010 9:51:44 AM
1
2 7
3 13 17 29 34 37 39 74 76 88 100
4 1 4 9 20 23 27 31 32 73 75 79 93 98
5 8 10 11 12 21 38 94
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1 2 2.833333 2.880952 0.5217492 30 26/05/2010 9:53:18 AM
1
2 1 9 10 23 38 73 88
3 4 7 8 12 13 17 20 21 27 29 31 34 37 39 74 75 79 93 94 98 100
4 11 32
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;
run;
_________________________________________________________________
MSN Dating: Find someone special. Start now.
http://go.microsoft.com/?linkid=9729707