LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sxiao@SFWMD.GOV

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.


Back to: Top of message | Previous page | Main SAS-L page