The first thing to remember is that ALL
macro stuff is string text as string
substitution. Therefor chop out the
year characters out of the string and
since the macro stuff is string the %eval()
function will convert the string internally
and perform the arithmetic and then convert
the result back to string being returned.
Hope this is helpful.
Senior Programmer Analyst, IM&R
Russell Investment Group
Global Leaders in Multi-Manager Investing
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Thursday, June 16, 2005 2:15 PM
Subject: How to covert macro variable to number and assign back to macro
I need to pass a month variable into my macro.
Then I want to convert it to number, and increase it by 200.
Say if the value is 200405, then after pass in into macro
I want to get 200605 and assign it to a new macro variable.
For instance, in above code, &MONTH contain value of 200405.
I want to get 200605(200405+200) and assign it to a new macro