Date: Fri, 3 May 1996 09:47:54 +0100
Reply-To: Andrew Smith <suqajsmi@READING.AC.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Andrew Smith <suqajsmi@READING.AC.UK>
Organization: University of Reading, U.K.
Subject: Re: Variable Initialisation Again!
On Wed, 1 May 1996, John Whittington wrote:
> ... It seems that
> RETAIN only results in initialisation if an explicit initial value for the
> variable(s) is given (akin to having an assignment statement).
Yes. Variables that aren't RETAINEd are set to missing at the start of
each iteration of the data step. RETAIN merely suppresses that, so that
variables continue to have whatever value they were last given until
something else gives them a new value.
The messages about 'Variable X is uninitialised' surely come at execution
time, not from compilation. It just says that when the data step completed
running, the variable had never been given a value.
University of Reading