Date: Thu, 17 Apr 2008 09:48:02 -0600
Reply-To: Alan Churchill <savian001@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alan Churchill <savian001@GMAIL.COM>
Subject: Re: dynamically set up libname
Content-Type: text/plain; charset="iso-8859-1"
There are lots of ways of solving this problem. Here is one:
Ship your code with a configuration file and then dynamically allocate the
libname a needed.
Say you have a config file (parms.xml):
<?xml version="1.0" encoding="UTF-8"?>
...and some SAS code...
%macro allocate (libname=);
libname Test "&libname" ;
Marry the 2 pieces and you should have a way to dynamically allocate your
libraries. You could also use a datastep and a %include instead of a macro
but there are dozens of variations here.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
SUBSCRIBE SAS-L Dan
Sent: Thursday, April 17, 2008 8:54 AM
Subject: dynamically set up libname
I am having a task to dynamically set up the libname. Here is the situation:
libname derive 'I:\Test';
The data sets and programs are all reside at 'I:\Test';
Then we will copy the folder to a CD and give it to the client. They will
run on their own machine. Since now the physical location of the folder
will be changed to the client machine 'C:\"what ever their own machine
assign to the CD drive"\Test',
then how I am going to set up the libname in the program and let the client
do a "monkey" job to run the program? I think this is a mission impossible.
Thanks for the helping.