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 (November 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 3 Nov 2008 09:16:09 -0500
Reply-To:     Ed Heaton <EdHeaton@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ed Heaton <EdHeaton@WESTAT.COM>
Subject:      Re: A SAS macro variable question
Comments: To: "A.B." <alicia.bingo@GMAIL.COM>
In-Reply-To:  <72fda1cf0810311202j21f293flf48e4934c3bc45ce@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

A.B.;

In SAS 9.2, the default is

Options noMInOperator ;

You might need to add

Options mInOperator ;

Ed

Edward Heaton, Senior Systems Analyst, Westat (An Employee-Owned Research Corporation), 1650 Research Boulevard, TB-286, Rockville, MD 20850-3195 Voice: (301) 610-4818 Fax: (301) 294-2085 mailto:EdHeaton@Westat.com http://www.Westat.com

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of A.B. Sent: Friday, October 31, 2008 3:03 PM To: SAS-L@LISTSERV.UGA.EDU Subject: A SAS macro variable question

Hi,

I have a simple macro that I use to create dataset. In the macro I check to see if the variable name is in a list of strings:

%macro mydata(ds); ... %if "&ds" in ("apple", "pear", "orange") %then pid=substr(id,1,6); ... %mend;

The macro variable was resolved correctly, but SAS gave the following message:

ERROR: Required operator not found in expression: "&ds" in ("apple", "pear", "orange") ERROR: The macro MYDATA will stop executing.

This seemed working OK in SAS 9.1 but not in SAS 9.2. Can anyone tell me what might be the problem?

Thanks, -- A.B.


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