Wednesday, April 15, 2009

Bookmark and Share

compress function in SAS

I am posting a small code to convert IP address in in SAS files from character to numeric form

this will make easier to sort bunch of ip address given in log files...

libname ashu "D:\saslibraries";    

data ashu.dest(drop = name);                                                                                                          

set ashu .source;                                                                                                                                  

name = compress(cip,'.'); * might need to change the ip c-ip to cip while importing file to SAS                                                                                                                                                              

cip1 = put(name,12.);

run;

proc sort data = ashu.dest out = dest;

by cip1;

run;







No comments:

Post a Comment