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 (February 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 19 Feb 2001 08:02:33 -0800
Reply-To:   "Huang, Ya" <ya.huang@AGOURON.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Huang, Ya" <ya.huang@AGOURON.COM>
Subject:   Re: keeping variable
Comments:   To: Chelsea <admin.ra@IOIP.COM>
Content-Type:   multipart/alternative;

How about this:

data big; retain x1-x10 (1 2 3 4 5 6 7 8 9 10);

data small; retain x1-x5 (2 3 4 5 6);

*find the variable names from small *; proc sql noprint; select name into :namelist separated by ' ' from dictionary.columns where libname='WORK' and memname='SMALL' ;

data big; set big (keep=&namelist);

proc print; run; -------------

Obs x1 x2 x3 x4 x5

1 1 2 3 4 5

HTH

Ya Huang

-----Original Message----- From: Chelsea [mailto:admin.ra@IOIP.COM] Sent: Sunday, February 18, 2001 7:04 PM To: SAS-L@LISTSERV.UGA.EDU Subject: keeping variable

I have a smaller dataset with 600 variables, and a bigger dataset with 1200 varialbes. Now I need to create a subset from the bigger dataset, but the subset should only have 600 variables that are present in the smaller dataset. How should I do this?

Thanks!

- chelsea


[text/html]


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