Date: Wed, 6 Sep 2006 17:46:36 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Need help with SASAUTOS, MAUTOSOURCE, ???
In-Reply-To: <16FD64291482A34F995D2AF14A5C932C015A6C88@MAIL002.prod.ds.russell.com>
Content-Type: text/plain; format=flowed
Mark ,
Well aside from teh obvious name collision you have try the following:
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test1);
options nosasautos;
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test2);
options nosasautos;
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test3);
options nosasautos;
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test4);
options nosasautos;
options sasautos=('!SASROOT/sasautos' );
Toby Dunn
When everything is coming at you all at once, your in the wrong lane.
A truly happy person is someone who can smile and enjoy the scenery on a
detour.
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Need help with SASAUTOS, MAUTOSOURCE, ???
Date: Wed, 6 Sep 2006 10:36:46 -0700
Hi ALL,
re: Need help with SASAUTOS, MAUTOSOURCE, ???
Current result, ONLY the FIRST options SASAUTOS
incurred gets used for the remainder of the SAS session.
Goal, get to where it can toggle back and forth? (possible?)
For test purposes, a macro file in each of two directories as
shown below.
In directory - /home/dir1/sasmacro - a macro called testloc:
%macro testloc(theMsg);
%put ++++++++++++++++++++++++++++++++++++++++++;
%put This macro is from /home/dir1/sasmacro.;
%put Your message is &theMsg..;
%put ++++++++++++++++++++++++++++++++++++++++++;
%mend;
In directory - /home/dir2/sasmacro - a macro called testloc:
%macro testloc(theMsg);
%put ++++++++++++++++++++++++++++++++++++++++++;
%put This macro is from /home/dir2/sasmacro.;
%put Your message is &theMsg..;
%put ++++++++++++++++++++++++++++++++++++++++++;
%mend;
In an interactive SAS session the following program:
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test1);
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test2);
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test3);
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test4);
yields:
1 options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
2 %testloc(test1);
++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir1/sasmacro.
Your message is test1.
++++++++++++++++++++++++++++++++++++++++++
3
4 options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
5 %testloc(test2);
++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir1/sasmacro.
Your message is test2.
++++++++++++++++++++++++++++++++++++++++++
6
7 options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
8 %testloc(test3);
++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir1/sasmacro.
Your message is test3.
++++++++++++++++++++++++++++++++++++++++++
9
10 options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
11 %testloc(test4);
++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir1/sasmacro.
Your message is test4.
++++++++++++++++++++++++++++++++++++++++++
In a DIFFERENT interactive SAS session the following program:
(note that dir2 is first this time, instead of dir1)
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test1);
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test2);
options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
%testloc(test3);
options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
%testloc(test4);
yields:
1
2
3
4 options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
5 %testloc(test1);
+++++++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir2/sasmacro.
Your message is test1.
+++++++++++++++++++++++++++++++++++++++++++++++
6
7 options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
8 %testloc(test2);
+++++++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir2/sasmacro.
Your message is test2.
+++++++++++++++++++++++++++++++++++++++++++++++
9
10 options sasautos=('!SASROOT/sasautos' '/home/dir2/sasmacro');
11 %testloc(test3);
+++++++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir2/sasmacro.
Your message is test3.
+++++++++++++++++++++++++++++++++++++++++++++++
12
13 options sasautos=('!SASROOT/sasautos' '/home/dir1/sasmacro');
14 %testloc(test4);
+++++++++++++++++++++++++++++++++++++++++++++++
This macro is from /home/dir2/sasmacro.
Your message is test4.
+++++++++++++++++++++++++++++++++++++++++++++++
The pattern thus far is that whatever path is found on the very first
occurance of OPTIONS SASAUTOS= is permanent for the remainder
of the SAS session.
Adding all combinations of MAUTOSOURCE and MRECALL get
the same results.
Is there a way to toggle back and forth between autocall libraries
within the same SAS session?
Currently using v8.2 today. Checking SAS doc states that:
"...after the session starts, any new directories you
specify override any current autocall libraries..."
Any help would be appreciated,
Mark