From: ash007 on
Hello Sas-Users,

I want to know something please.

If I execute this pgm PGMA:
%include'D:\Documents\scan_pgm1.sas' ;
%include'D:\Documents\scan_pgm2.sas' ;

When PGMA is executing scan_pgm1.sas, can I modify scan_pgm2.sas ?
Will SAS take into consideration the modifications.

Thanks.

Ash_rmy
From: Scott Barry on
On Tue, 15 Sep 2009 05:35:59 -0700, ash007 <ramsamyashley(a)GMAIL.COM> wrote:

>Hello Sas-Users,
>
>I want to know something please.
>
>If I execute this pgm PGMA:
>%include'D:\Documents\scan_pgm1.sas' ;
>%include'D:\Documents\scan_pgm2.sas' ;
>
>When PGMA is executing scan_pgm1.sas, can I modify scan_pgm2.sas ?
>Will SAS take into consideration the modifications.
>
>Thanks.
>
>Ash_rmy

Code a RUN; statement between the %INCLUDE statements. SAS will compile
and execute up until the RUN; statement.

By the way, you can test this yourself, but using a DATA step with the X =
SLEEP(60); command, in the first program. Then test it with and without a
RUN; statement. You will see how SAS compiles up to the next PROC or DATA
step or RUN; statement. So when you code the RUN; either in your SAS window
or in the first %INCLUDE, you will see that your second SAS program is not
compiled until the first is completed.

Scott Barry
SBBWorks, Inc.
From: Joe Matise on
As long as you save the file before the %include statement is executed,
yes. It will execute the pgm1 lines in order, then execute the second
%include. Not necessarily a good idea, though, you would probably be better
off just running the one program and then the other once you were done with
it, since you might not save it in time for the updates to take effect.

-Joe

On Tue, Sep 15, 2009 at 7:35 AM, ash007 <ramsamyashley(a)gmail.com> wrote:

> Hello Sas-Users,
>
> I want to know something please.
>
> If I execute this pgm PGMA:
> %include'D:\Documents\scan_pgm1.sas' ;
> %include'D:\Documents\scan_pgm2.sas' ;
>
> When PGMA is executing scan_pgm1.sas, can I modify scan_pgm2.sas ?
> Will SAS take into consideration the modifications.
>
> Thanks.
>
> Ash_rmy
>
From: Andre Wielki on
Ash

think also about the -EEFILECHANGEUPDATES in the config file
if you are updating in an external editor

but i agree with Joe it is not a good idea for two direct following
lines like you present it

Andre

Joe Matise a �crit :
> As long as you save the file before the %include statement is executed,
> yes. It will execute the pgm1 lines in order, then execute the second
> %include. Not necessarily a good idea, though, you would probably be better
> off just running the one program and then the other once you were done with
> it, since you might not save it in time for the updates to take effect.
>
> -Joe
>
> On Tue, Sep 15, 2009 at 7:35 AM, ash007 <ramsamyashley(a)gmail.com> wrote:
>
>
>> Hello Sas-Users,
>>
>> I want to know something please.
>>
>> If I execute this pgm PGMA:
>> %include'D:\Documents\scan_pgm1.sas' ;
>> %include'D:\Documents\scan_pgm2.sas' ;
>>
>> When PGMA is executing scan_pgm1.sas, can I modify scan_pgm2.sas ?
>> Will SAS take into consideration the modifications.
>>
>> Thanks.
>>
>> Ash_rmy
>>
>>
>
>

--
Andr� WIELKI
INED (Institut National d'Etudes D�mographiques)
Service Informatique
133 Boulevard Davout 75980 Paris Cedex 20
m�l : wielki(a)ined.fr t�l : 33 (0) 1 56 06 21 54