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 16:45:09 -0500
Reply-To:     Schechter Robert RS <robert.schecter@PHWILM.ZENECA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: "WHITLOI1@westat.com" <WHITLOI1@westat.com>
From:         Schechter Robert RS <robert.schecter@PHWILM.ZENECA.COM>
Subject:      Re: I'll take SAS History for 200, Alex.
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

Yes, it is only the presents of the semicolon that counts. 1 Data; input x; cards;

NOTE: The data set WORK.DATA1 has 3 observations and 1 variables. NOTE: The DATA statement used 1.42 seconds.

5 /* Or no statement; at all */ 6 proc 7 print; run;

NOTE: The PROCEDURE PRINT used 0.44 seconds.

> ---------- > From: WHITLOI1@westat.com[SMTP:WHITLOI1@westat.com] > Sent: Friday, November 19, 1999 4:29 PM > To: Schechter Robert RS > Subject: Re[2]: I'll take SAS History for 200, Alex. > > Robert, > > This follows your rule but isn't a statement. Put it in quotes and you > could > claim it isn't a semi-colon, but just a quoted semi-colon. > > 1222 > 1223 data w ; input ; cards ; > > NOTE: The data set WORK.W has 0 observations and 0 variables. > NOTE: DATA statement used: > real time 0.06 seconds > > 1224 /* Or no statement; at all */ > > Ian Whitlock <whitloi1@westat.com> > > > ____________________Reply Separator____________________ > Subject: Re: I'll take SAS History for 200, Alex. > Author: Schechter Robert RS <robert.schecter@PHWILM.ZENECA.COM> > Date: 11/19/1999 3:57 PM > > Yes, I believe you're missing a lot. It could include any of > Ron's step boundaries as well: > > > 1. run; > 2. semicolon(s) after Cards statement: [at least] one after Cards, four > after Cards4 (two if by sea) > 3. data [xxxx]; > 4. proc [xxxx]; > 5. endsas; > 6. end of input file in noninteractive or batch > > My only point was the rule is it needs a semicolon on the next line, or as > I'm corrected an end of input file in noninteractive or batch > > > > PROC xxxx; > DATA xxxx; > %macro name; > > > ---------- > > From: Lund, Pete[SMTP:Peter.Lund@cfc.wa.gov] > > Sent: Friday, November 19, 1999 3:37 PM > > To: Schechter Robert RS; SAS-L@LISTSERV.UGA.EDU > > Subject: RE: I'll take SAS History for 200, Alex. > > > > Bob- > > Good point of clarification. Data following a CARDS statement is > > terminated by a line with a ; on it. AFAIK, that can only be a null > line > > (;), a RUN; or a *...; comment. Any others I'm missing? > > > > Pete Lund > > WA State Caseload Forecast Council > > (360) 902-0086 voice > > (360) 902-0084 fax > > peter.lund@cfc.wa.gov > > > > > > -----Original Message----- > > From: Schechter Robert RS [mailto:robert.schecter@PHWILM.ZENECA.COM] > > Sent: Friday, November 19, 1999 11:51 AM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: Re: I'll take SAS History for 200, Alex. > > > > > > No I believe your wrong. The rule is having the ; on the line, not > > necessarily a step boundary. the SAS comment: > > * this is the end of my data; > > while not a step boundary would work just fine because of the obligatory > > semi-colon. > > > > > ---------- > > > From: Lund, Pete[SMTP:Peter.Lund@CFC.WA.GOV] > > > Sent: Friday, November 19, 1999 2:34 PM > > > To: SAS-L@LISTSERV.UGA.EDU > > > Subject: Re: I'll take SAS History for 200, Alex. > > > > > > 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