good day,
here is my program.
just wondering why if the up and down row are exact the same. the result always = 40?
is it something wrong with my program? word "checking" only 8 character.
data testing2; input name $40.; infile datalines dlm=','; datalines; checking checking checking checking checking1 checking2 ; run;
data testing3; set testing2; name2=compress(name); lag_name=compress(lag(name)); run;
data testing4; set testing3;
if substr(compress(name2),1,40) = substr(compress(lag_name),1,40) then Length_match_Lag ="40"; else if substr(compress(name2),1,9) = substr(compress(lag_name),1,9) then Length_match_Lag ="9"; else if substr(compress(name2),1,8) = substr(compress(lag_name),1,8) then Length_match_Lag ="8";
run;
thanks in advance
harry
... View more