LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 9 Sep 2005 11:00:04 -0400
Reply-To:   Nathaniel_Wooding@DOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <Nathaniel_Wooding@DOM.COM>
Subject:   Re: How to get directory from LIBNAME or equivalent
Comments:   To: Patrice.Bourdages@IAAH.CA
Content-Type:   text/plain; charset="US-ASCII"

Patrice

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;;

source=file;

Note two items

1) you need to define a character variable to hold the filename info and 2) you need to stick this info somewhere, I used a new variable called Source, because the variable file is temporary.

Nat Wooding

Patrice Bourdages <Patrice.Bourdage To: SAS-L@LISTSERV.UGA.EDU s@IAAH.CA> cc: Sent by: "SAS(r) Subject: How to get directory from LIBNAME or equivalent Discussion" <SAS-L@LISTSERV.U GA.EDU>

09/09/05 10:30 AM Please respond to Patrice.Bourdages

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 statement ???

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 matter...

TIA for any reply.

Sincerely yours,

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.


Back to: Top of message | Previous page | Main SAS-L page