Date: Thu, 12 Apr 2007 21:52:02 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: complex ASCII import
On Thu, 12 Apr 2007 07:03:07 -0400, Markus Steiner <m.steiner@ABDN.AC.UK> wrote:
>Hello,
>
>I am having problems to get my head around to import the following file(s);
>these are exports from a monitoring tool and every observation is a single
>file of the following structure:
>
>SerNr,55148
>RecNum,17
>AutoQCOn,1
>StorageOption,0
>QCGrade,2
>Boolean1,0
>Date,15.04.2006
>PatientID,R101c
>BirthDate,15.04.86
>Height,158
>Weight,5800
>Gender,1
>Smoker,1
>Time,07:50:38,07:49:55,07:48:59
>TEQ1,-2.257,-1.764,-1.817
>TEQ6,-2.642,-2.14,-2.186
>Tzero,0.05,0.05,0.08
>CurveFV_1, CurveFV_2, CurveFV_3, CurveVT_1, CurveVT_2, CurveVT_3,
>CurveFV_1p, CurveFV_2p, CurveFV_3p, CurveVT_1p, CurveVT_2p, CurveVT_3p
>-98,-74, ,0,0, , , , , , , ,
>-216,-189, ,-8,-12 , , , , , , , ,
>-291,-292, ,-39,-42, , , , , , , ,
>-330,-318, ,-75,-72, , , , , , , ,
>-370,-354, ,-107, , , , , , , , ,
>.
>.
>.
>
>The 3 files I would like to get from there are:
>1.
>PatID Date DoB SerNr RecNum Height Weight Smoker ...
>R101c 15.04.06 15.04.86 55148 17 158 5800 1
>R102a ... (from next file)
>.
>.
>.
>
>2.
>PatID Date TEQ1 TEQ6 Tzero
>R101c 15.04.06 -2.257 -2.642 0.05
>R101c 15.04.06 -1.764 -2.14 0.05
>R101c 15.04.06 -1.817 -2.186 0.08
>R102a ... (from next file)
>.
>.
>.
>
>3.
>PatID Date CurveFV_1 CurveFV_2 CurveVT_1 CurveVT_2
>R101c 15.04.06 -98 -78 0 0
>R101c 15.04.06 -216 -189 -8 -12
>R101c 15.04.06 -291 -292 -39 -42
>R101c 15.04.06 -330 -318 -75 -72
>R101c 15.04.06 -370 -354 -107 .
>R102a ... (from next file)
>.
>.
>.
>
>
>Also if possible I would like to give only the directory name where all the
>files are located (>1000) without listing each file separately.
>
>I tried
>FILENAME import "C:\pathname\*.csv";
>which works, however this works only if I do not need the FIRSTOBS option in
>the INFILE statement.
>
>Thank you,
>regards
>
>Markus Steiner
>DEOM, University of Aberdeen
First, when a follow-up post is needed, please do not change the subject in
any way. To do so interferes with the threading.
Question: Do the dimensions of two embedded matrices (one with "T"
identifiers and one with "Curve") change from one file to the next? Or will
there always be 3 rows under TEQ1 etc., and 5 rows under the Curve headings?
|