Katja,
Sounds to me like you have a versioning problem namely in naming
conventions. Naming a new version the same as your old version has lead you
to need the macros in two different locations. In general I find this bad
form and only moves the problem to some other place.
I never name two macros the same name. If I come out with a new version I
delete the old version and use the new version. Where the new version
will have all the functionality of old version plus what ever updates/fixes
or enhancements I added. In one shop they did want to keep old versions
for some weird reason (we never used them they just took up space) but then
I gave the new versions a suffix of V2 denoteing that it was version 2 of
the macro. Not the best thing as you always had to update the programs that
called these macros when you created a new version, but hey it was their
idea and money not mine.
Toby Dunn
From: SUBSCRIBE SAS-L Katja Glaß <***@GMX.DE>
Reply-To: SUBSCRIBE SAS-L Katja Glaß <***@GMX.DE>
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: Reset compiled macros
Date: Mon, 6 Feb 2006 04:58:49 -0500
Hi Stéphane,
this helps me quite a lot to find a solution. By having quite a lot of
macros I can't use this way directly. The environment is a bit more
complex than having just several versions of macros. For this I can't
store all possible ways of needed macros in several libs.
With this:
options mstored sasmstore= mylib1 sasautos=('H:\temp\version1');
options mstored sasmstore= mylib2 sasautos=('H:\temp\version2');
it would be a wonderful solution, if sas would store the macros
of 'H:\temp\version1' which are not in mylib1 in mylib1. But SAS stores it
in work.
The solution I found now is to delete all entries of work.sasmacr (earlier
I tried to delete the hole catalog, which does not work the way I needed).
So switching is - with "options mstored sasautos=('H:\temp\versionX');"
and deleting - possible.
Thanks a lot for helping me.
Regards
Katja
Post by Stéphane ColasHi ,
I found a solution, could you test it ?
I take two macros which are stored in two lib. In my opinion, the system
options
Post by Stéphane Colaswill be increased with sasmstore= mylib1 and sasmstore= mylib2 after to
can
Post by Stéphane Colaschange of destination.
libname mylib1 'C:\';
options mstored sasmstore=mylib1;
%macro test /store;
%put this is the first version;
%mend;
libname mylib2 'C:\SAS';
options mstored sasmstore=mylib2;
%macro test /store;
%put this is the second version;
%mend;
options mstored sasmstore= mylib1 sasautos=(mylib1);
%test;
options mstored sasmstore= mylib2 sasautos=(mylib2);
%test;
But, without sasmstore before %test, this test doesn't work, you see ?
HTH
Stéphane.
Post by SUBSCRIBE SAS-L Katja GlaÃHello,
I need to reset compiled macros and hope there is a way in SAS.
The problem is I have several folders with macros, which have different
versions. I have to switch through these versions without restarting SAS
or including the files (sometimes in these folders are also programs).
I use SASAUTOS to search for macros in my folders. At first, it should
use
Post by Stéphane ColasPost by SUBSCRIBE SAS-L Katja GlaÃSASAUTOS(path.version1) and after a time, I want to use newer macros
SASAUTOS(path.version2). The problem is, that by using a macro in
version1
Post by Stéphane ColasPost by SUBSCRIBE SAS-L Katja GlaÃSAS stores it. When changing the SASAUTOS to path.version2 it takes
still
Post by Stéphane ColasPost by SUBSCRIBE SAS-L Katja GlaÃthe version1 macro.
For this I need to reset the compiled macros, so that SAS starts
searching
Post by Stéphane ColasPost by SUBSCRIBE SAS-L Katja GlaÃagain from SASAUTOS. By deleting work.sasmacr SAS does also not search
for
Post by Stéphane ColasPost by SUBSCRIBE SAS-L Katja GlaÃthis macro.
Maybe there is a command, that SAS thinks it is restarted, without
reloading everything?
Thanks