Google SAS Search

Add to Google

Wednesday, November 16, 2011

Remove Formatting From Variables

What do you do if you have a SAS data set with formatted variables, but you don't have access to the format? You have to remove the format from the variables if you want to work with the data set.

The easiest way to remove formats from variables in a data set is to use proc datasets.

Assuming I have a data set named Responses with some variables that have formats applied to them that no longer exist.


proc datasets library = myLibrary memtype=data;
modify responses;
attrib _all_ format=;
run;
quit;

3 comments:

  1. Yes, options nofmterr will work also. I forgot about it. Thanks for the reminder! -s

    ReplyDelete
  2. How to to do data cleansing ???

    ReplyDelete