Date: Wed, 25 May 2011 08:53:23 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: %include path relative to location of the current program
file?
In-Reply-To: <587F57B26FAA8246A81D10D251EB8AB4028970893E@EXCH07.GHCMASTER.GHC.ORG>
Content-Type: text/plain; charset=ISO-8859-1
http://www.sascommunity.org/wiki/Get_Name_of_Program
-Joe
On Wed, May 25, 2011 at 8:32 AM, Pardee, Roy <pardee.r@ghc.org> wrote:
> Hey All,
>
> I've got some biggish, "production"-ish jobs that are split up into
> multiple program files, which I %include into a main control program. I've
> also got a couple of versions stored in different places (e.g., a
> development location where I'm working, and a deployment location where it
> runs for real). I've been doing things like this in main.sas:
>
> %let codehome = \\bibbity\bobbity\boo ;
> %include "&codehome.\set_em_up.sas" ;
> %include "&codehome.\knock_em_down.sas" ;
>
> And when I move from dev to deployment I edit the codehome var so it points
> to the deployed versions of those files.
>
> This works, but gives me an opportunity to forget to edit codehome & screw
> up in a more conspicuous fashion than I'd like.
>
> Does SAS have a function to retrieve the location of the currently running
> program, so I can set that programmatically?
>
> Thanks!
>
> -Roy
>
> Roy Pardee | DATA WRANGLER
> Group Health Research Institute
>
> PHONE 360-447-8773 | 206-287-2078
> E-MAIL pardee.r@ghc.org
> www.grouphealthresearch.org
>
> GHC Confidentiality Statement
>
> This message and any attached files might contain confidential information
> protected by federal and state law. The information is intended only for the
> use of the individual(s) or entities originally named as addressees. The
> improper disclosure of such information may be subject to civil or criminal
> penalties. If this message reached you in error, please contact the sender
> and destroy this message. Disclosing, copying, forwarding, or distributing
> the information by unauthorized individuals or entities is strictly
> prohibited by law.
>
|