Date: Tue, 26 Aug 2008 13:01:03 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>"
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>"
Subject: Re: call execute + %include
On Tue, 26 Aug 2008 06:46:51 -0700, shashi <shashi2707@GMAIL.COM> wrote:
>Here I have little confusion over the below code.
>if patientid=99999 then
>call execute('%include "path\x.sas";');
>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?
Code looks OK, and works for me. First I set up the environment:
x 'mkdir "sql"';
libname sql 'sql';
do patientid = 0, 99999, 1, 99999; output; end;
x 'mkdir "path"';
put 'proc setinit; run;';
Then I ran the code exactly as shown. PROC SETINIT ran twice, as expected.
When I ran the %include by itself
PROC SETINIT ran once, as expected.
So it's apparently something in the environment.