Date: Sun, 1 Jul 2007 08:29:26 -0400
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Organization: Internet News Service
Subject: %include oddity
The docs for %include state
"The %INCLUDE statement must begin at a statement boundary. That is, it must
be the first statement in a SAS job or must immediately follow a semicolon
ending another statement"
However, that is not always the case. Consider SET with an embedded
%include.
------------------------------------
filename foo catalog 'work.foo.list.source';
data _null_;
file foo;
put 'sashelp.class sashelp.class';
run;
* this works;
data twoclass;
set %include foo;;
run;
* this does not work;
data threeclass;
set sashelp.class %include foo;;
run;
* this works;
data threeclass_try2;
set %include foo; sashelp.class;
run;
------------------------------------
Any insights on why the first and third steps work and the second doesn't
(seeing how the others did) ?
Richard A. DeVenezia