Date: Tue, 28 Aug 2007 17:31:49 -0700
Reply-To: igotz.aubin@GMAIL.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: igotz.aubin@GMAIL.COM
Organization: http://groups.google.com
Subject: Help on the use of the colon in a data set step
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I would like to have a quick explanation of the use of the colon in
the following data step:
data B (drop = eff: i Dc);
set A (drop = Age_End);
length cum_eff: 3;
by Age;
array cum_eff{5};
array effectif{5} eff: ;
retain cum_: 0;
if first.Age
then do;
do i=1 to 5;
cum_eff{i}=0;
end;
end;
do i=1 to 5;
cum_eff{i} = cum_eff{i} + effectif{i};
end;
if last.Age;
run;
The question is : what do I need the colon in the line of command:
retain cum_: 0; ? Indeed, if I do not put the colon, the sum is not
propoerly done.
Many thanks in advance for your kind help.
Best regards.
Igotz.
|