Toby, Chris and everyone who responded offline, thanks and very much
On 9.2 the same code produces:
ERROR: There is no matching %IF statement for the %THEN. A dummy macro will
214 %let x="F";
216 %mend test;
217 %test ('B')
WARNING: Apparent invocation of macro TEST not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.
While I agree that error checking is important, I thought that SAS always
ensured that previous code would continue to work. This is the second such
discrepancy with that rule I've seen this week. Proc import using Excel as
the DBMS on 64 bit systems was the other.
On Fri, 14 Jan 2011 10:02:18 -0500, Chris Brooks <Chris.Brooks@ONS.GOV.UK>
>This code runs on 9.1.3 SP4 - no errors, notes or warnings and outputs "F"
>to the log.
>Office for National Statistics
>On Fri, 14 Jan 2011 09:51:21 -0500, Arthur Tabachneck <art297@ROGERS.COM>
>>If I correctly understood the discussion, a couple of our list's members
>>suggested that code, like the following, would work with 9.1 and earlier,
>>but not with 9.2. Does it work with 9.1 and/or earlier versions?
>>%macro test (something);
>> %if &something. eq 'A' %then %do;
>> data want;
>> set sashelp.class (where=(sex eq 'M'));
>> %let x="M";
>> %else %then %do;
>> %let x="F";
>>Thanks in advance,