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 (November 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 15 Nov 1999 16:37:50 +0100
Reply-To:     peter.crawford@DB.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      PROC CATALOG
Comments: cc: dwall@QBLM.QUINTILES.COM
Content-type: text/plain; charset=us-ascii

Hi Dianne I don't think you can achieve what you want, without some change Either use logical catalog concatenation, which only arrives in SAS v7/8 or rename two of those catalogs so you can identify them in a libname concatenating the 3 folders or use separate libnames to identify each folder

The important thing before v7/8 is that you must be able to identify those sasmacr catalogs individually. Then they may be merged into your work stored macro catalog, using proc build, which has a catalog merge feature. You may rename(subject to sas naming rules) with operating system utilities like explorer. But you can't merge catalog entries without SAS software, because the catalogs and catalog entries have a proprietary structure unknow to op.sys utilities. So you have to identify each catalog to the SAS System. The only "pointers" are libname and/or catname. If you don't want extra libnames, then you must change the catnames from sasMacr to something unique.

If you want to merge the personal macro catalogs of all members of a team, say, then perhaps your autoexec should include system() calls to copy all those to one common folder, with unique names, solving both problems at once. A similar situation might require merging a cascade of installation, application and user catalogs.

Have you a solution to the question of which catalog should take precedence in the merge, when a macro name appears in more than one sasMacr ? Proc catalog copy: overwrites automatically. Proc build merge: won't overwrite without the replace option.

good luck

Datum: 15.11.99 15:35 An: SAS-L@listserv.uga.edu

Antwort an: J.Groeneveld@itgroups.com

Betreff: Re: PROC CATALOG Nachrichtentext:

Dianne,

As far as I know by head compiled macros can only be contained in a single file called SASMACRO.SC2 within any directory (libname). How would you dump these compiled macros into one WORK.SASMACR catalog? I think, one would overwrite the other, leaving you with only one of the three. This also explains your experience. I think, you should leave them in their own directory and let SAS search those directories. I am not sure whether you can have SAS search for more than one compiled macro set. Using a single set, but more directories with source code macros, I used the following code:

OPTIONS nomrecall mautosource sasautos=(automac1 automac2 AutoMac3); /* location of macro's */ filename automac1 "c:\sas\core\sasmacro"; filename automac2 "&StudyDir.\sasprog\macro"; FILENAME AutoMac3 'S:\Statistics\SAS\MACRO\STANDARD'; LIBNAME AutoMac0 "&StudyDir.\SASPROG\MACRO"; %* same as FILENAME AutoMac2; OPTIONS MSTORED SASMSTORE=AutoMac0; %* For stored SAS macros; RUN;

If you do succeed in searching three compiled macro catalogs, I think duplicates are handled in the order first found, only used. That depends from the search order you specify.

I hope this helps a little in finding out more of it yourself. Let me know your final findings.

Regards - Jim. -- Y. Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070 senior statistician P.O. Box 1 fax. +31 412 407 080 5350 AA BERGHEM IMRO TRAMARKO: a CRO J.Groeneveld@ITGroups.com the Netherlands in clinical research

"My job is to keep my computer working." - Jim Groeneveld

> -----Original Message----- > From: dwall@QBLM.QUINTILES.COM [SMTP:dwall@QBLM.QUINTILES.COM] > Sent: Monday, November 15, 1999 9:32 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: PROC CATALOG > > Dear SAS-L > > I am running SAS 6.12 on Windows NT... > > Suppose I have 3 directories, each containing the catalog > SASMACR (containing macros). > > Suppose I have a LIBNAME pointing to these three directories. > LIBNAME macros ('directory1', 'directory2', 'directory3'); > > If I want to dump all these macros into the WORK.SASMACR > catalog on the start-up of SAS, I would have to include a > proc catalog statement in my AUTOEXEC.SAS. Right? > > When I run the proc catalog, it only includes the macros in the > FIRST directory's SASMACR. It ignores the macros in the other > two directories. Is there a way to get around this WITHOUT defining > a separate libname for each directory, and running 3 proc catalog > statements. > > Another thing, how does SAS handle duplicates. For example, if > two different macros have the same name in two different catalogs, > will the first always be over-written by the second? > > Thanks for your help in advance. I look forward to hearing from you. > Dianne


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