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 (October 2000, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 31 Oct 2000 17:20:31 -0500
Reply-To:     "Todt, Frederick R" <todt@BATTELLE.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Todt, Frederick R" <todt@BATTELLE.ORG>
Subject:      Re: Macro variable in var-list

Thanks to many people for their responses! As they all correctly pointed out, the problem was NOT with the variable list, but with the way I assigned a value to the macro variable. I used a CALL SYMPUT, and got tripped up with leading blanks.

Fred Todt

-----Original Message----- From: Fred Todt [mailto:todt@BATTELLE.ORG] Sent: Tuesday, October 31, 2000 4:31 PM To: SAS-L@LISTSERV.UGA.EDU Cc: Fred Todt Subject: Macro variable in var-list

Is there a special rule governing macro variable name substitution in a "variable list"? I want to generate the following SAS statement in a PROC MEANS procedure, within a macro:

var s1-s30;

but when I use the statement:

var s1-s&mvarname;

where the macro variable "mvarname" has value "30", I get (using MPRINT option):

var s1 -s 30

and lots of syntax errors. (Note the space before the macro variable value, and also the semicolon disappeared!).

Can anyone see what I'm doing wrong, or direct me to the proper documentation? Thanks.


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