Skip to main content
Article thumbnail
Location of Repository

SAS Global Forum 2011 Coders ' Corner



The RETAIN statement is one method that SAS ® programmers commonly use for making comparisons across observations. One source of misunderstanding around the RETAIN statement centers around how long a value is retained and the ability or need to reset retained variables in many circumstances. This paper clarifies, through examples, how the RETAIN statement overrides the default behavior of a DATA step and maintains a variable’s values until the value is reset. The scope of the paper is to demonstrate the use of the RETAIN statement in conjunction with assignment statements

Year: 2013
OAI identifier: oai:CiteSeerX.psu:
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • (external link)
  • (external link)
  • Suggested articles

    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.