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 (March 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 12 Mar 2010 14:32:03 -0500
Reply-To:   "Fehd, Ronald J. (CDC/OSELS/NCPHI)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (CDC/OSELS/NCPHI)" <rjf2@CDC.GOV>
Subject:   Re: 'Relative' %include statements to assign libraries.
In-Reply-To:   <3cf9f5a81003120806u41809afai1cfcef6090ef81b@mail.gmail.com>
Content-Type:   text/plain; charset=us-ascii

an autoexec is the way to handle assigning global statements like filename and libname

Batch Processing under Windows

TinyUrl: http://tinyurl.com/6zlqoh

http://www.sascommunity.org/wiki/Batch_processing_under_Windows

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

> -----Original Message----- > From: owner-sas-l@listserv.uga.edu [mailto:owner-sas- > l@listserv.uga.edu] On Behalf Of JD > Sent: Friday, March 12, 2010 11:07 AM > To: sas-l > Subject: 'Relative' %include statements to assign libraries. > > Need: > I have sas jobs that need to be tested. The jobs in the test folder > will > point to test libraries. > I will then move those jobs to a production folder where they will > point to > production libraries. I do not want to change the libnames when moving > it. > Rather I'd like to simply put a libnameAssignment.sas file pointing to > test > libs in one and same file name pointing to production libs in the > other. > Then, if the SAS job had a "%include" with relative references pointing > to > the libNames.sas file, the job could be moved with no changes. > > There are probably better ways to do the above so feel free to ignore > everything after this line if there is a good, standard method of doing > this > already. thanks in advance > > > > If I set my environment variable to something like: > > Variable Name: tempProd > > Variable value: c:\ > > > > And then put the batch job and libname.sas program in the "C:\TempProd" > folder and kick off the job, it works. > > > > Here is the batch job: > > %include '..\tempProd\libNames.sas'; > > sas code > > . > > . > > . > > sascode > > > > Here is the contents of the libNames.sas file (which will change > depending > if it is in the Test or Prod folder): > > libname dmApp odbc dsn=datamart18 schema='APP' insertbuff = 2000; > > > > libname C520 odbc dsn=datamart schema='C520' ; > > > > My problem is that the jobs will not reside on the 'C' drive. They will > reside on a network drive somewhere. If I could put that network path > in the > Variable Name in the environment variable it would work but it doesn't > recognize it. I'm guessing that the enviornment variable is only good > for > the PC the SAS system is loaded on.


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