Date: Sat, 1 Oct 2005 13:23:25 +0000
Reply-To: Steve Jones <st_jones77@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Steve Jones <st_jones77@YAHOO.COM>
Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
Subject: Re: Help: macro to rename variable in a set statement not working
Content-Type: text/plain; charset=ISO-8859-1
I left out the match key. It is infact an ID field.
What I want is this:
(note: Rather than using variable names x1, y1, I will use just x and
1. I have a parent/population dataset with variables x and y.
2. The dataset is broken by a criteria into 3 datasets (good, bad,
each with the same variable name (x, y).
3. Now, I need to match/merge the datasets together again for an
4. So, original variable x, in dataset one should be x_1, in dataset 2
it should be x_2.
So the final merged datset should have six variables as follows:
x_1 x_2 x_3 y_1 y_2 y_3
"monal kohli" <k_monal_99@YAHOO.COM> wrote in message
> I am not sure if I am getting this,but how will you
> merge them if you rename in the merge step.Like if
> S1,S2,S3 have common variable x and y.So I am assuming
> that you will be merge like this:
> data all;
> merge s1(in=a) s2(in=b) s3(in=c);
> by x y;
> if a and b then flag="AB";
> else if a and c then flag="AC";
> else if
> Something like this.But if you can explain
> further,there can be a better solution.
> --- Steve Jones <st_jones77@YAHOO.COM> wrote:
> > Hello all,
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG