There are (or at least were) many DOS utilities circulating on the internet
that could perform your changes at once. These takeas command line
parameters a file name, a string to search for and a string to replace it
with and run in batch. You could feed a list of filenames to it using the
DOS batch file construct FOR. Another alternative consists of using a (DOS)
file manager to run the program for each indicated file (can you do that in
Windows? Win-commander perhaps?).
If you do change it in whatever way, change it so that the definition occurs
only once in some .SAS file that is automatically run each time SAS is
started (with a specific project). So the replace string should be empty and
if you don't have it already you should use a project specific icon on your
desktop starting SAS, running a project specific START###.SAS file, in which
a lot of initial settings are performed. This START file should be specified
after the SAS command as the -AUTOEXEC option. In your START file you should
a.o. define the LIBNAME.
Regards - Jim.
Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070
senior statistician, P.O. Box 1 fax. +31 412 407 080
head IT department 5350 AA BERGHEM IMRO TRAMARKO: a CRO
J.Groeneveld@ITGroups.com the Netherlands in clinical research
My computer allows me to be buggy, imperfect; my wife ......
> -----Original Message-----
> From: Peter Crawford [SMTP:peter.crawford@DB.COM]
> Sent: Wednesday, April 19, 2000 12:57 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: question:Change file and libnames over many sas programs
> The underlying problem (physical path and other external names in sas
> code) was
> faced by a large sas-based project in this organisation.
> We have tried an alternative solution when storage administrators required
> change of HLQ (high level qualifier - or path )
> Our strategy is as far as possible to put the physical names into some
> data, and link to these from code with a new layer we have called
> name". One business name can refer to one or more physical names, each
> with it's
> own logical reference - libref or fileref.
> It seems to be working.
> When the physical name of an important common file had to be changed, we
> noticed - Only one row of meta data changed. Previously the change would
> affected too many programs to treat so casually !
> Timing helped.
> We combined the introduction of the strategy with changes for y2k
> Those of you going to SEUGI in Dublin will be able to see my presentation
> this solution (probably in coders corner).
> Hope to see you there
> Regards to the -L
> Peter Crawford
> Hugues Richard <hugues@PANTERA.RI.MGH.MCGILL.CA>@listserv.vt.edu> on
> 04/18/2000 01:53:05 PM
> Please respond to email@example.com
> Sent by: "SAS(r) Discussion" <SAS-L@listserv.vt.edu>
> To: SAS-L@LISTSERV.VT.EDU
> Subject: Newbie question:Change a word in several sas programs
> Hello ,
> I'm using sas V8 on winnt . All my sas files are in the folder
> oldname/ . I want to change the name of the folder to newname/. But
> I've got a lot of sas programs with the LIBNAME statement and I don't
> want to open each sas file and do a Edit-Replace oldname with newname.
> So , for all sas programs in the oldname folder , I want to change this
> LIBNAME final "E:/oldname/final/data" ;
> This statement: LIBNAME final "E:/newname/ final/data" ;
> I wonder if there is an automatic way (or software on PC) to do that...