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 (May 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 14 May 1996 19:44:44 -0400
Reply-To:     AMICELI <AMICELI@ADVANTA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         AMICELI <AMICELI@ADVANTA.COM>
Subject:      Re: macro q again

In response to the idea that &dat must have quotes around the value because of code like: %IF &DAT='UN' %THEN %DO;

the substitution of code:

%if &dat=UN %then %do;

Will work just as well if you omit the quotes from the assignment statement. for a line like: IF SUBSTR(MONTH,1,2)=&DAT

the substitution of code: if substr(month,1,2)="&dat" will work just as well when there are no quotes in the macro value.

The point is, that with macro variables you can go either way. However, it is easier to leave the quotes out of the macro value because then you won't have to use quoting functions later on.

Amy Miceli


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