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 (April 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 Apr 2004 09:46:20 -0600
Reply-To:     William Kossack <kossackw@NJC.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         William Kossack <kossackw@NJC.ORG>
Organization: Posted via Supernews, http://www.supernews.com
Subject:      Re: cleaning up a dataset
Content-Type: text/plain; charset=us-ascii

thanks guys I got it working finally. Unfortunately my access to usenet was out after I last posted so I did not see any of these

here is how I did it though I thought about using transpose

proc contents noprint data=f out=varname1 (keep=name format informat);

data _null_; set varname1; cnt+1; call symput('attrib'||left(cnt),trim(NAME)); call symput('amax',left(cnt));

run;

%macro missing; data blankdata; set f;

%do x=1 %to &amax;

data _null_; set blankdata; call symput('dropvar',"drop "||"&&attrib&x"||";"); call symput('value',&&attrib&x);run; run; data blankdata; set blankdata; %put 'value test ' &value; %if &value ne %str( ) and &value ne . %then %do; %put 'value test test test ' &value; &dropvar; %end; run; %end;

%mend missing; %missing; run;

William Kossack wrote:

> I have a dataset with only one record both character and numberic > fields. > > I'm trying to find a way of keeping only the variables that missing data > so a report can be generated showing where information is missing


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