Date: Thu, 25 Mar 2004 12:30:00 -0500
Reply-To: Cynthia qiu <cynqiu@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Cynthia qiu <cynqiu@YAHOO.COM>
Subject: very simple macro question
I have a question that is really very basic. Why wont the following code
work?
%macro test ;
data person;
infile datalines delimiter=',';
input name $ dept $;
datalines;
John,Sales
Mary,Acctng
;
%mend test ;
%test
Here is the log:
531 %macro test ;
532 data person;
533 infile datalines delimiter=',';
534 input name $ dept $;
535 datalines;
536 John,Sales
537 Mary,Acctng
538 ;
539
540 %mend test ;
541 %test
ERROR: The macro TEST generated CARDS (data lines) for the DATA step, which
could cause incorrect results. The DATA step
and the macro will stop executing.
NOTE: The data set WORK.PERSON has 0 observations and 2 variables.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds
ERROR: The macro TEST will stop executing.
|