Macro that able to find values with characters you would like the values to end with.

by Irina 9. June 2007 13:14
options 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 );

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Authors

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010

    Sign in

    eXTReMe Tracker