LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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.


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