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 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Feb 2009 16:53:04 +0000
Reply-To:     karma <dorjetarap@GOOGLEMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         karma <dorjetarap@GOOGLEMAIL.COM>
Subject:      Re: A Variable value combination Question - VERY VERY URGENT
Comments: To: Tom Smith <need_sas_help@yahoo.com>
In-Reply-To:  <200902041616.n14BkWvt015498@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

HTH

data have; input subject Group $; cards; 10021 Perga 12124 double 12545 Perga 47845 Single ;run;

data want(drop=group rename=(groups=group)); retain groups ; length groups $30; do until (eof1); set have(keep=group) end=eof1; if ^index(groups, strip(group)) then groups = catx('/',groups, group); end; do until(eof2); set have end=eof2; output; end; run;

2009/2/4 Tom Smith <need_sas_help@yahoo.com>: > I have the following dataset with two variables (subject, Group): > > subject Group > ------ > 10021 Perga > 12124 double > 12545 Perga > 47845 Single > > > I need to combine the variable Group so it shows all possible > values for each subject the final dataset result should be > as below: > > > subject Group > ------ > 10021 Perga/double/single > 12124 Perga/double/single > 12545 Perga/double/single > 47845 Perga/double/single > > Thank you >


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