Date: Thu, 5 Jun 2008 09:15:39 -0400
Reply-To: msz03@albany.edu
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Zdeb <msz03@ALBANY.EDU>
Subject: Re: Creating a second dimension
Content-Type: text/plain;charset=iso-8859-1
hi ... I'm sure you'll get lots of answers ... here's one ... disclaimer: no claim of
"professional" status by posting this answer
data a;
input cola : $1. @@;
datalines;
A B C
;
run;
data b;
set a nobs=obs;
do _n_ = 1 to obs;
set a (rename=(cola=colb)) point=_n_;
output;
end;
run ;
--
Mike Zdeb
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
> Hi there,
>
> I have a small challenge to solve, which I can't do on my on with my
> current knowledge of SAS. I'm sure it souldn't be too difficult for a
> professional.
>
> Imagine the following table:
>
> colA
> ------
> A
> B
> C
>
> What I want to reach is the following:
>
> colA colB
> ------- -------
> A A
> A B
> A C
> B A
> B B
> B C
> C A
> C B
> C C
>
> I hope you get the idea. I'd be very thankful for any help.
>
> Thanks!
>
> Joshua
>
>