Hello members,
Can you please help me find out what's wrong with the red part? Thanks!!!!!
%macro cov (cutt,cutc); %do i=1 %to 2; data covA&i.; infile "&pathr.WS1_A.rep&i..sc" FIRSTOBS=3 OBS=43 missover pad; input rawA&i. 5-6 thetaA&i. 10-15; run; data covB&i.; infile "&pathr.WS2_B.rep&i..sc" FIRSTOBS=3 OBS=43 missover pad; input rawB&i. 5-6 thetaB&i. 10-15; run; data conAB&i.; merge covA&i. covB&i.; diffA&i.=abs(thetaA&i.-&cutt.); diffB&i.=abs(thetaB&i.-&cutt.); run;
proc print data=conAB&i.;run;
proc sql noprint; select min(abs(thetaA&i.-&cutt.)) into :minthetaA&i. from conAB&i. where thetaA&i.>=0; select min(abs(thetaB&i.-&cutt.)) into :minthetaB&i. from conAB&i. where thetaB&i.>=0; quit; %put minimum thetaA diff is &&minthetaA&i.; %put minimum thetaB diff is &&minthetaB&i.;
proc sql noprint; select rawA&i. into :rawA&i. from conAB&i. where diffA&i.= &&minthetaA&i.; select rawB&i. into :rawB&i. from conAB&i. where diffB&i.= &&minthetaB&i.; quit; %put raw cutA is &&rawA&i.; %put raw cutB is &&rawB&i.;
data cut&cutc.&i.; cutrawA=&&rawA&i.; cutrawB=&&rawB&i. ; run;
%if &i=1 %then %do; data cov&cutc.;set cut&cutc.&i.;run;%end; %else %do; data cov&cutc.;set cov&cutc. cut&cutc.&i.;run; %end;
%end; %mend; %cov (cutt=0, cutc=zero); %cov (cutt=0.5,cutc=low);
------------------------- log-----
WARNING: Apparent symbolic reference RAWA1 not resolved. raw cutA is &rawA1 WARNING: Apparent symbolic reference RAWB1 not resolved. raw cutB is &rawB1 NOTE: Line generated by the macro variable "I". 1 &rawA1 - 22 WARNING: Apparent symbolic reference RAWA1 not resolved. NOTE: Line generated by the macro variable "I". 1 &rawB1 - 22 WARNING: Apparent symbolic reference RAWB1 not resolved.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT.
NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.CUTLOW1 may be incomplete. When this step was stopped there were 0 observations and 4 variables. WARNING: Data set WORK.CUTLOW1 was not replaced because this step was stopped. NOTE: DATA statement used (Total process time):
... View more