LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Aug 2007 09:38:12 -0700
Reply-To:     Matthew Yurdin <Matthew.Yurdin@UCOP.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Matthew Yurdin <Matthew.Yurdin@UCOP.EDU>
Subject:      macro for purging specified variables
Content-Type: text/plain; charset="us-ascii"

Does anyone have some code for searching through a number of specified libraries/directories for SAS datasets containing certain specified variables and then dropping all those variables from the datasets? The idea here to get rid of personally-identifiable information when that information can go by many different name variations and may or may not found in a large number of datasets spread throughout many different directories. So I'm imagining something like... %macro purgeids(libslist=temp1 temp2 temp3 temp4 temp5 etc, /* libraries in which to search for datasets with any vars in &varlist */ varslist=ssn socsecno social_security_number birthdate bdate bday /* variables to look for in every dataset in &libslist. If it finds anything from &varslist, it will re-save the dataset with the same name but without the variable(s) */ ); /* ??????? */ %mend purgeids; Thanks -Matt


Back to: Top of message | Previous page | Main SAS-L page