Date: Fri, 23 Feb 2001 21:27:14 +0100
Reply-To: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Subject: Re: Where am I? Need current path in UNIX
or just:
libname Here '.';
%let path=%sysfunc(pathname(Here));
Lex
"Cecilia Casas" <Cecilia.Casas@rtp.ppdi.com> wrote in message
news:3A96C386.662F9458@rtp.ppdi.com...
> I know this works in Unix, and some other operating systems, but I am not
sure:
>
> libname Here '.';
>
> proc sql;
> select path from dictionary.members
> where libname="HERE"
> ;
>
> You can select Path into a Macro Variable by doing:
>
> select path into :path from dictionary.members
> where libname="HERE"
> ;
>
> then you have the Macro variable &path.
>
> Cecilia
>
>
> Ray Pass wrote:
>
> > I know there's a better way to do this, like an automatic system macro
> > variable or something of that ilk, but my brain is tired.
> >
> > I need to know the exact location (path) that a program is being
executed
> > from in UNIX. I want it to end up in a macro variable (&prog), and I'm
> > using the following code only because I can't think of a better way.
Can
> > anyone help out? TIA.
> >
> > filename pwd pipe "pwd";
> >
> > data _null_;
> > infile pwd truncover;
> > input pwd $100.;
> > call symput('prog', trim(pwd));
> > run;
> >
> > Ray
> >
> > *------------------------------------------------*
> > | Ray Pass, Ph.D. voice: (914) 693-5553 |
> > | Ray Pass Consulting eFax: (914) 206-3780 |
> > | 5 Sinclair Place |
> > | Hartsdale, NY 10530 e-mail: raypass@att.net |
> > *------------------------------------------------*
>
|