Date: Wed, 18 Oct 2006 08:28:24 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: declare some number as a character variable in macro
In-Reply-To: <1161150103.120407.212970@b28g2000cwb.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
All SAS macrovariables contain type character values. How you use them in a Data step, PROC, or SQL query determines their types at compile and run time.
An assignment statement year=&year;, for example, may initiate a new numeric variable named year with a value of 1991. On the other hand, an assignment year="&year" (note that double quote marks allow the macrovariable to resolve to its value) may initiate a character value named year with a value of '1991'. Of course, if a variable already has a type, special procedures apply.
Sig
From: hba2pd
Sent: Wed 10/18/2006 1:41 AM
To: sas-l@uga.edu
Subject: declare some number as a character variable in macro
Hello,
I would like to declear a number as a character variable in macro. That
is,
%let year=1991
I wish to have 1991 as a character variable, not as a numeric variable.
How can I do this?
Best regards,
|