LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 3 Jun 2005 15:41:15 -0400
Reply-To:     "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject:      Re: macro variable will not evaluate as numeric
Comments: To: sas-l@uga.edu

Ryan Diver wrote: > I'm new to macro coding and I'm trying to create a macro that will > give me a 1/0 variable for every combination of two variables. The > macro runs with out error messages, but all of the variables only > have values of 0. It doesn't look like the condition for assigning a > 1 is being met, but I can't figure out why. Any suggestions on the > following code would be helpful.

Use %EVAL to have the logical resolution of a macro expression be replaced into the source stream.

%LET X=0;

%PUT &X=0; %PUT &X=1; %PUT %EVAL(&X=0); %PUT %EVAL(&X=1);

-- Richard A. DeVenezia http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page