Date: Wed, 25 May 2011 06:32:36 -0700
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: %include path relative to location of the current program file?
Content-Type: text/plain; charset="us-ascii"
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.