Sunday, September 7, 2008

Using wildcard to reduce code

-
Using a wildcard (:) in the variable lists would reduce the code to a great extent.
-
Colon can be used as a wildcard in variable lists. In the example given below, (keep=v:)
keeps all variable names that begins with letter v.
-
data x(keep=v:) ;
v1=1 ;
v2=10 ;
v3=100 ;
v4=1000 ;
v5=10000 ;
w1=1;
w2=10;
run;

More:
http://support.sas.com/publishing/pubcat/chaps/55513.pdf
-

No comments:

Post a Comment