If Venky's pathname doesn't work, try the filename option on the infile
statement as in the snipped below.
length file $ 50;
infile txt filename=file lrecl=80 truncover;
informat txt $72.;
input txt $ 1-72;;
Note two items
1) you need to define a character variable to hold the filename info
2) you need to stick this info somewhere, I used a new variable called
Source, because the variable file is temporary.
<Patrice.Bourdage To: SAS-L@LISTSERV.UGA.EDU
Sent by: "SAS(r) Subject: How to get directory from LIBNAME or equivalent
09/09/05 10:30 AM
Please respond to
Hello to you all...
Once again, I'm asking the strangest question...
Is there a way to extract / get / extirpate the directory from a libname
Here's an example of what I'm looking for :
libname Test1 "/data1/mergedata";
I need to know, further down in some other program, where the libname "
Test1 " points to as directory with something like :
Extract = GetDirectory( "Test1" )
Extract would then contain "/data1/mergedata".
The problem here is that the libname statement assigns standard librairies
depending if we are in DEV or PROD mode. So Test1 will point to
/data1/mergedata in PROD mode and /data2/mergedata in DEV mode.
Hope somebody has an answer to this one... I've looked into documentation
for the past hour and couldn't find anything of interest regarding this
TIA for any reply.
Patrice Bourdages :-)
CONFIDENTIALITY NOTICE: This electronic message contains information
which may be legally confidential and/or privileged and does not in any
case represent a firm ENERGY COMMODITY bid or offer relating thereto
which binds the sender without an additional express written
confirmation to that effect. The information is intended solely for
the individual or entity named above and access by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information is
prohibited and may be unlawful. If you have received this electronic
transmission in error, please reply immediately to the sender that you
have received the message in error, and delete it. Thank you.