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 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 19 Nov 1999 11:34:18 -0800
Reply-To:   "Lund, Pete" <Peter.Lund@CFC.WA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Lund, Pete" <Peter.Lund@CFC.WA.GOV>
Subject:   Re: I'll take SAS History for 200, Alex.
Content-Type:   text/plain; charset="ISO-8859-1"

There is a little "gothca" to the lack of a semicolon following CARDS/DATALINES data. Usually, the combination of the two tokens RUN and ; form a step boundary. As long as they occur sequentially it doesn't matter if there are spaces or lines between them. For example, the following code works just fine:

data test; put 'this is a test making test'; x = _n_; run

;

However, if the RUN is coming after CARDS/DATALINES data, the RUN and the ; *must* be on the same physical line. For example:

data test; input x; cards; 1 2 3 run ;

This causes an error as the value "run" is trying to be read into the numeric variable x. Putting the RUN and ; on the same line solves the "problem" as does inserting a null line (;) between 3 and RUN.

If I had to take my shot at Ron's question - the six step boundaries are RUN;, PROC, DATA, %MACRO, %MEND;, and ; when following CARDS or DATALINES data.

Pete Lund WA State Caseload Forecast Council (360) 902-0086 voice (360) 902-0084 fax peter.lund@cfc.wa.gov

-----Original Message----- From: Fehd, Ronald J. [mailto:rjf2@CDC.GOV] Sent: Friday, November 19, 1999 11:01 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: I'll take SAS History for 200, Alex.

From: Lambert, Bob [mailto:Bob_Lambert@AFCC.COM] /Why is semicolon needed at end of cards statement?

What SAS statements are step boundaries? [hint: six items]

Ya gotta know this stuff in order to do macros.

Ron Fehd that maven CDC Atlanta GA


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