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 (January 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 12 Jan 2011 08:51:44 -0500
Reply-To:   Arthur Tabachneck <art297@ROGERS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@ROGERS.COM>
Subject:   Re: how to drop no of variables in datstep?
Comments:   To: Shaik Hymad <hymadsk@GMAIL.COM>

Nway,

One way would be the following:

data have; input a b_t c d_t; cards; 1 2 3 4 1 2 3 4 ;

proc sql noprint; select name into :names separated by ' ' from dictionary.columns where libname eq 'WORK' and memname eq 'HAVE' and reverse(upcase(trim(name))) like 'T^_%' escape '^' ; quit;

data want; set have (drop=&names.); run;

HTH, Art --------- On Wed, 12 Jan 2011 04:30:35 -0500, Nway <hymadsk@GMAIL.COM> wrote:

>Hi All, > > i have 50 variables in datset > > i have 20 variable names like xy_t zm_t .....etc > > i want to drop, which are having at the end of the variable is "_t" > > could you please let me know, how to do this in datstep? > >Thanks, >Nway.


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