Date: Mon, 31 Mar 2003 11:41:09 -0500
Reply-To: Vladimir Gretchko <vlad_gretchko@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Vladimir Gretchko <vlad_gretchko@HOTMAIL.COM>
Subject: newbie question : readin ASCII
Dear SAS-L'ers
is it possible to read the follow file?
Thank you very much!
Vlad
Structure of the file:
Subject:,01
/* k lines with garbage follow*/
Period 1,
/* l lines with garbage follow */
value1, value2, ..., value15
/* there are m lines like this with real data*/
/* n lines with garbage follow */
Subject:,01
/* k lines with garbage follow*/
Period 2,
/* l lines with garbage follow */
value1, value2, ..., value15
/* there are m lines like this with real data*/
/* varying number of lines with garbage follow */
/* repeat for subjects 2 - XX */
The example of the file:
Subject:01
garbage
garbage
Period 1
garbage
garbage
garbage
garbage
garbage
0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
A,B,C,D,E,F,G,H,I
0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09
AA,BB,CC,DD,EE,FF,GG,HH,II
garbage
garbage
garbage
Subject:01
garbage
garbage
Period 2
garbage
garbage
garbage
garbage
garbage
A,B,C,D,E,F,G,H,I
0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
AA,BB,CC,DD,EE,FF,GG,HH,II
0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09
*unknown number of garbage lines;
*same structure for Subject 2, etc.;
I need the data set like this:
/*Subject Period Var1 Var2 ... Var9*/
1,1,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
1,1,A,B,C,D,E,F,G,H,I
1,1,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09
1,1,AA,BB,CC,DD,EE,FF,GG,HH,II
1,2,A,B,C,D,E,F,G,H,I
1,2,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
1,2,AA,BB,CC,DD,EE,FF,GG,HH,II
1,2,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09
2,1,........
2,1,........
2,1,........
2,1,........
2,2,........
2,2,........
2,2,........
2,2,........
|