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 (May 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 May 2002 15:08:28 -0400
Reply-To:     "Droogendyk, Harry" <Harry.Droogendyk@CIT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <Harry.Droogendyk@CIT.COM>
Subject:      Re: Quick question
Content-Type: text/plain; charset="iso-8859-1"

colon does the trick.

data new; set old (keep = duration: ); run;

-----Original Message----- From: Cacialli, Doug [mailto:Doug_Cacialli@URMC.ROCHESTER.EDU] Sent: Wednesday, May 22, 2002 2:14 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Quick question

I know that a solution to this question is floating around out there in the archives somewhere, but I've been searching for close to thirty minutes and I can't find it.

I'm attempting to split up a data set with a LOT of variables (too many to list in a KEEP statement and still get out of here tonight, anyway). Almost all the variables share a handful of common prefixes (i.e., DURATION1, DURATION2, DURATION3, DURATION4, etc.). The desired result is to have a handful of datasets, each consisting of all the variables sharing a common prefix.

So how do I tell SAS to keep all variables of a certain prefix? Thanks y'all.

Doug out.


Douglas Cacialli - Data Manager / Data Analyst

Sleep and Depression Research Laboratory

University of Rochester Medical Center

300 Crittenden Blvd. - Box PSYCH

Rochester, New York 14642

Phone: (585)273-3309 Fax: (585)273-3682



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