Date: Mon, 6 Aug 2007 16:15:44 -0400
Reply-To: Kevin Roland Viel <kviel@EMORY.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kevin Roland Viel <kviel@EMORY.EDU>
Subject: Re: Global variables?
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 6 Aug 2007, Dale, Jason - BLS wrote:
> Is there a way to declare a global variable so that multiple data steps
> can refer to this variable without having to assign it in each data
You can create a dataset, which you will read (SET or MERGE) each time.
You can use macro variables:
%let macvar = 10 ;
data one ;
x = &macvar. ;
data two ;
y = 10 ** &macvar. ;
There are several other possibilities, too. Each has pitfalls. Could you
discribe in more detail what you would like to do?
Department of Epidemiology
Rollins School of Public Health
Atlanta, GA 30322