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 (December 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 16 Dec 2003 15:01:33 -0500
Reply-To:     "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject:      Re: path to executing file

"Evert Carton" <me@you.he> wrote in message news:pan.2003.12.16.19.32.18.895404@you.he... > Hi, > > > Given the following; > > Directory structure: > > /path/to/sas/programs > > I'm currently in /path/to > > I want to execute a SAS/BASE-program, myprogram.sas, in programs, and I do as such > (assuming sas is in my PATH) > > sas sas/programs/myprogram.sas > > Now, is there any way, in SAS, for the SAS-program to find out where in > the filesystem it does live, or how it is being referred to (in this case > as "sas/programs/myprogram.sas") ? > > I know there is a macro variable, SASPROCESSNAME, which would in this case say > "Program ./sas/programs/myprogram.sas" > But I would like the absolute path to the file ... > > Hope I make myself clear. The above explanation does of course reflect a > UNIX-setup, but, ultimately, I'm looking for a Win2K-solution. > Just so you know ... ;-) > > Thx > Evert >

I am unaware of SASPROCESSNAME macro variable, but you can use filename and pathname to obtain absolute path given relative path.

filename currdir ".";

%put %sysfunc(pathname(currdir));

filename currdir;

-- Richard A. DeVenezia http://www.devenezia.com/downloads/sas/macros


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