LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 Apr 2000 13:07:03 +0200
Reply-To:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject:   Re: question:Change file and libnames over many sas programs
Comments:   To: "hugues@PANTERA.RI.MGH.MCGILL.CA" <hugues@PANTERA.RI.MGH.MCGILL.CA>
Content-Type:   text/plain

Hugues,

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 > meta > data, and link to these from code with a new layer we have called > "business > 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 > hardly > noticed - Only one row of meta data changed. Previously the change would > have > affected too many programs to treat so casually ! > Timing helped. > We combined the introduction of the strategy with changes for y2k > compliance. > > Those of you going to SEUGI in Dublin will be able to see my presentation > of > 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 hugues@pantera.ri.mgh.mcgill.ca > > Sent by: "SAS(r) Discussion" <SAS-L@listserv.vt.edu> > > > To: SAS-L@LISTSERV.VT.EDU > cc: > 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 > statement > LIBNAME final "E:/oldname/final/data" ; > > TO > > This statement: LIBNAME final "E:/newname/ final/data" ; > > I wonder if there is an automatic way (or software on PC) to do that... > > Thanks, > Hugues


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