LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 24 Nov 2007 14:38:40 -0500
Reply-To:   SUBSCRIBE SAS-L Philippe <laffilippe@YAHOO.FR>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   SUBSCRIBE SAS-L Philippe <laffilippe@YAHOO.FR>
Subject:   Re: speedy transpose

Hi,

I would like to know which technique is more acceptable and speed for : 10 000 000 observations * 12 period * 500 kpi (the goal is to have 10 000 000 observations * 6000 kpi)

technique 1 :

data foo; input id1 id2 id3 X Y Z; cards; 1 1 1 43 54 665 1 1 2 45 6565 6565 run;

proc transpose data=foo out=foo2; by id1 id2 id3; var x y z; run;

data foo3; set foo2; myname = trim(_name_) || put(id3,4.-L); run;

proc transpose data=foo3 out=foowide; by id1 id2; id myname; var col1; run;

technique 2 :

data a; do ident=1 to 10; do periode=1 to 12; kpi1 = round(ranuni(123)*1000); kpi2 = round(ranuni(123)*1000); kpi3 = round(ranuni(123)*1000); kpi4 = round(ranuni(123)*1000); output; end; end; run;

data final; set a; by ident; retain final1-final48 ; array kpi(4); array final(48) ; if first.ident then do; do i=1 to 48; final(i)=.; end; end; do i=1 to dim(kpi); final(i+4*(periode-1))=kpi(i); end; if last.ident then output; run;

Thanks in advance, Philippe


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