Macro that able to find values with characters you would like the values to end with.
9. June 2007 13:14options mprint; %macro varss(dsn,chr,var); data stam; set &dsn; if reverse(substr(compress( reverse (&var)),1,length( &chr )))= &chr ; run; %mend varss; %varss(halvaot.new_var_ekcpr,'3m', effect ); %varss(halvaot.new_var_ekcpr,'6m', effect );

Email 