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 (August 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Aug 2008 13:01:03 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: call execute + %include

On Tue, 26 Aug 2008 06:46:51 -0700, shashi <shashi2707@GMAIL.COM> wrote:

>Hi, >Here I have little confusion over the below code. > >data _null_; >set sql.tblpatients; >if patientid=99999 then >call execute('%include "path\x.sas";'); >run; > >If I run this code, an error,'can not open file %include path\x.sas'is >being shown in the log. >if I run '%include' statement seperately and run this code later, it >is running without any error. >Is there any mistake in my code? Could anybody suggest on this? > > >Thanks, >Shashi

Code looks OK, and works for me. First I set up the environment:

x 'mkdir "sql"'; libname sql 'sql'; data sql.tblpatients; do patientid = 0, 99999, 1, 99999; output; end; run;

x 'mkdir "path"'; data _null_; file "path\x.sas"; put 'proc setinit; run;'; run;

Then I ran the code exactly as shown. PROC SETINIT ran twice, as expected. When I ran the %include by itself

%include "path\x.sas";

PROC SETINIT ran once, as expected.

So it's apparently something in the environment.


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