Date: Sat, 25 Jun 2005 09:53:52 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: how to create a matrix in sas?
Yue,
data one;
input name $ age gender $;
cards;
A 5 M
B 9 M
C 7 F
;
run;
proc sql;
create table two as
select l.name,
r.age,
l.gender
from one as l, one as r
order by name,age;
quit;
Art
----------
On Fri, 24 Jun 2005 19:27:24 -0700, yue@YAHOO.COM wrote:
>for example, i have the following dataset
>
>name age gender .....
>A 5 M
>B 9 M
>C 7 F
>
>I want to get all possible combination between name and age to get
>output like this
>
>name date gender .....
>A 5 M
>A 9 M
>A 7 M
>B 5 M
>B 9 M
>B 7 M
>C 5 F
>C 9 F
>C 7 F
>
>can this be done by merging with itself?
>
>TIA
|