Date: Fri, 19 Oct 2007 06:01:56 -0400
Reply-To: Jim Groeneveld <jim4stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim4stat@YAHOO.CO.UK>
Subject: Re: Data "transpose" help needed, thanks
CORRECTED REPLY!
Hi Steven,
That can also failry smple be performed using my macro MR2RM. It has been
discussed on Sas-L many times in the recent past. It has more advantages
thatn just denormalizing a data structure. Have a look in the SAS-L
archives. Download MR2RM.zip with MR2RM.sas inside from
http://home.hccnet.nl/jim.groeneveld/software/SASmacro and also follow
instructions in MR2RM.txt (downloading a few more auxiliary macros).
Then the needed SA code should be:
DATA XX; SET XX; Name_ID = RANK (Name); RUN; * MR2RM need numeric Index;
%MR2RM (DATA=xx, OUT=YY, Overwrit=Y, VarList=Value, Index=Name_ID, ByList=Date);
PROC DATASETS; MODIFY YY; RENAME Value65=A Value66=B Value67=C; RUN;
PROC PRINT DATA=YY; RUN;
Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
My computer's keyboard has quirks, I'm not making the typing errors.
|