Date: Sat, 21 Jul 2007 07:42:08 -0500
Reply-To: schmitta@UWM.EDU
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Thomas A Schmitt <schmitta@UWM.EDU>
Subject: Moving to the next line
Content-Type: text/plain; charset=ISO-8859-1
Hello Group:
I’m trying to get SAS to extract -0.028990 from something that looks like below.
I do a search for the phrase in my program as below and then want to drop down
the appropriate number of lines. Can someone tell me why the input / is not
working and what is wrong with my logic? Thank you!
Tom
FILENAME indat1 "G:\HGLM_1.txt";
FILENAME outdat1 "G:\pi_001_est.txt";
DATA one (KEEP = pi_001);
FILE outdat1 MOD;
INFILE indat1 LRECL=32000 TRUNCOVER ;
INPUT text $char200.;
IF INDEXW(text,'Final estimation of fixed effects: (Population-average model)')
THEN DO;
INPUT ////////;
pi_001 = SCAN(text,3,' ');
PUT pi_001;
END;
RUN;
Final estimation of fixed effects: (Population-average model)
----------------------------------------------------------------------------
Standard Approx.
Fixed Effect Coefficient Error T-ratio d.f. P-value
----------------------------------------------------------------------------
For INTRCPT1, P0
For INTRCPT2, B00
INTRCPT3, G000 -1.509855 0.126792 -11.908 8 0.000
W_M, G001 -0.028990 0.068379 -0.424 8 0.682
For X_JM, B01
INTRCPT3, G010 0.170230 0.352088 0.483 8 0.641
W_M, G011 -0.179020 0.490425 -0.365 8 0.724
|