|
> From: mark.k.moran@CENSUS.GOV [mailto:mark.k.moran@CENSUS.GOV]
I'll share some ideas from my upcoming SUGI paper:
Beginning Tutorials: A Tour of a Typical Project using SAS Macros
assumption:
directory structure:
c:\sas\project-name\htm HyperText Markup Language
c:\sas\project-name\pgm SAS programs
c:\sas\project-name\sas SAS data sets
c:\sas\project-name\sas2 SAS data sets secondary
it seems to be that you are talking about two libraries
libname LIBRARY <your stuff>;
libname LIBOTHR <the other stuff>;
I suggest that you use a global macro variable which might appropriately be
named:
%LET PATH = <directory-path: c:\sas\project-name>;
then your two libnames can be written:
libname LIBRARY "&PATH.<your stuff>";
libname LIBOTHR "&PATH.<the other stuff>";
These three statements are placed correctly in your autoexec.sas.
There are obvious advantages of assigning the libnames in one place,
mainly that by changing the macro variable you change both storage locations
and still keep them as siblings.
Another advantage is that you could use this mac-var PATH in our ODS
destinations:
%LET PATH_HTM = &PATH.<your stuff>\HTM;
ods html body="&PATH_HTM\&DATA..HTM";%*where DATA is a data set name;
and one day in the future, should you desire to clutter up just one
directory with all those data sets you can change the second libname LIBOTHR
to point to <your stuff>
and not have to change any of the 30 child programs.
It is kosher and acceptable to SAS to have two different libnames pointing
to the same location.
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
OpSys: WinNT Ver: 8.1
---> cheerful provider of UNTESTED SAS code!*! <---
> SAS gurus: I have about fifteen (15) SAS 6.12 programs that
> I have written
> for a certain project. When I run them, these 15 programs
> create at least
> that many SAS datasets. A colleague who is about to move on
> to another
> project has created about thirty (30) programs. I am
> inheriting all 30 of
> her programs from her. The raw data of all these 30 programs
> are the SAS
> datasets which my files create. I haven't checked exactly under which
> libnames where all the files which her programs create are
> stored. I do
> have a program containing all the libnames called by the 30 programs.
> Whenever something is run, exactly one of my programs would
> be run first,
> and then about six of her programs have to be run in a
> specific order (a
> different six are run if a different question is raised, and
> there are five
> questions--hence 5 questions x 6 programs = 30 programs).
> Within the next
> 16 working hours (2-3 days), my job is to change all these 30
> + 15 programs
> so that the output of all my programs goes into a new libname
> which has the
> UNIX directory ending in /panel1/my_stuff, and the output of
> all 30 of her
> programs go into a new libname which has the UNIX directory ending in
> /panel1/her_stuff. We anticipate having to do a /panel2/my_stuff and
> /panel2/her_stuff run within a few weeks of the original run,
> and maybe
> this will happen a couple more times this year. Would the
> SAS gurus care
> to share their thoughts on the best approach to accomplishing this?
>
|