Date: Tue, 28 Dec 1999 16:19:16 +0100
Reply-To: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject: Re: A data step question
Content-Type: text/plain; charset="iso-8859-1"
SET MAN (IN=Male) Woman;
IF Male THEN Gender='M';
Regards - Jim.
Y. Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070
senior statistician, P.O. Box 1 fax. +31 412 407 080
head IT department 5350 AA BERGHEM IMRO TRAMARKO: a CRO
J.Groeneveld@ITGroups.com the Netherlands in clinical research
I wish you a merry Christmas and a happy, compatible y²°°°
"My job is to keep my computer working." - Jim Groeneveld
> -----Original Message-----
> From: cpwong [SMTP:cpwong@SE.CUHK.EDU.HK]
> Sent: Tuesday, December 28, 1999 3:45 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: A data step question
> Hi Friends,
> Suppose I have two datasets: MAN (observations of man), WOMAN (obs of
> Both datasets have 2 variables: NAME, AGE
> Now I would like to have a single dataset HUMAN
> DATA HUMAN;
> SET MAN WOMAN;
> But I want to have an additional variable GENDER. So that All MAN obs
> should have GENDER=M. All WOMAN obs should have =F.
> I know a stupid way is
> DATA MAN;
> SET MAN;
> DATA WOMAN;
> SET WOMAN;
> Can you teach a clever syntax to do this ?
> Thanks in advance.