i have one sas data set . i have to check the value of some certain column in this data set.wheather ther are having missing value or not.
mcolumn : have list of column like col1,col2,col3
data _NULL_;
set lib.ABC;
if upcase(trim(symget('mcolumn'))) = "NA"
then do;
putlog "THEN MODULE";
call symputx('MandRet','1');
stop;
end;
else do;
putlog "not null";
s = countc(trim(symget('mcolumn')),',')+1;
n=1;
do while(n<=s);
put n=;
p=trim(scan(symget('mcolumn'),n,','));
PUT P=;
call symputx('ColValue',p);
IF missing(resolve(P)) THEN DO;
put P=;
PUTLOG "TRUE";
STOP;
END;
n=n+1;
end;
end;
run;
%mend Mandatory_column_check;
%Mandatory_column_check(AmdBLCMExtInitCsmAccount)
in the above program in do while loop i create one macro variable colvalue .it is containg name of column to be checked. in the next step i have to check column's value .....
but there is a rules that if create macro in data step then you can't use that macro in same data step......
i am completly in base sas 9.1 ...i don't know mush about that...and most of the time i get confusion abt macro concept....i am not able to understand how sas program works....please suggets me any book so that i can clear my basic concept.....