Date: Sun, 2 Jul 2006 15:13:14 -0400
Reply-To: Phil Rack <philrack@MINEQUEST.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Phil Rack <philrack@MINEQUEST.COM>
Subject: Re: run; quits; and other questions
In-Reply-To: <74227316AFB87C4687325EB8007D225A022E01@mq-sbs.mq.local>
Content-Type: text/plain; charset="us-ascii"
Alan,
I think you can have a proc or a data step execute without any run
statement as long as it's followed by another PROC or Data Step. For
example:
data a;
input v1 v2;
cards;
1 2
2 3
3 4
4 5
;;;;
data b; set a;
proc means data=b;
var a b;
data c;
set b;
c=v1+v2;
run;
Everything above executes.
-----Original Message-----
From: Alan Churchill [mailto:SASL001@SAVIAN.NET]
Sent: Sunday, July 02, 2006 2:56 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: run; quits; and other questions
I have a question for the listserv that is obscure but important.
I know I can do this horrible, horrible construct:
data test ;
set sashelp.class;
.and it will run without a run; statement.
However, I can't seem to run a proc without a run statement. A macro
,likewise, isn't recognized unless the prior data step is closed off
with a
run statement.
My question is what constructs are out there such as the data step
without a
run statement where SAS implicitly adds in a statement? I am only asking
about the major constructs such as procs and data step. So far, from my
testing, it appears that only a data step can take an implied run;
whereas
other statements require closure. Is this a valid assumption? Does this
also
apply to macros requiring a %mend in all cases?
Alan
Alan Churchill
Savian "Bridging SAS and Microsoft Technologies"
www.savian.net