Date: Thu, 18 Sep 2008 14:00:07 -0700
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: A Help Needed for Combining two vaiables - PLEASE
In-Reply-To: A<200809182048.m8IH4L2H004403@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Hi Tom,
PUT() converts numeric to string
and || concatenates string pieces
together.
data sample;
input Volume Unit $;
cards;
2 ml
4 mg
6 kg
8 ml
10 mg
;
run;
data result;
set sample;
Volumeu = put(Volume,2.)||' '||Unit;
run;
Hope this is helpful.
Mark Terjeson
Senior Programmer Analyst
Investment Management & Research
Russell Investments
253-439-2367
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tom
Smith
Sent: Thursday, September 18, 2008 1:48 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: A Help Needed for Combining two vaiables - PLEASE
I have two variables ( volume and unit ) in a dataset:
Volume Unit
------ ----
2 ml
4 mg
6 kg
8 ml
10 mg
I need to combine those two varibales into one variable (Volumeu) as
below:
Volumeu
-------
2 ml
4 mg
6 kg
8 ml
10 mg
Thanks you so much