| Date: | Fri, 5 Dec 1997 11:26:00 -0800 |
| Reply-To: | FDURIEUX@RAYCHEM.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Frederik Durieux <FDURIEUX@RAYCHEM.COM> |
| Subject: | Re: SAS Macros in work catalog |
|
| Content-Type: | text/plain; charset=US-ASCII |
Greg,
You'll propably have to use the autocall facility (see SAS Guide to
Macro Processing).
I use a stored/compiled macros. The macro sources are stored in a
separate catalog (as .SOURCE members). The compiled version resides in
a SASMACR catalog.
SAS system options MSTORED and SASMSTORE=general have to be in effect.
A created a macro which recompiles all macros that reside in my macro
source catalog in one go :
%MACRO COMPMAC ;
/* Select only macro sources */
%LET wc = libname = "<macro-library>" AND memname = "<macro-catalog>"
AND objtype = "SOURCE" ;
/* Retrieve macro names from SAS system table SASHELP.VCATALG */
%LET dsid = %SYSFUNC(OPEN(sashelp.vcatalg(WHERE = (&wc)),i)) ;
%LET eod = %SYSFUNC(FETCH(&dsid)) ;
%LET num = %SYSFUNC(VARNUM(&dsid,OBJNAME)) ;
%DO %WHILE (&eod = 0) ;
/* Get name of macro source */
%LET objname = %SYSFUNC(GETVARC(&dsid,&num)) ;
%LET fname = <macro-library>.<macro-catalog>.&objname..source ;
FILENAME msrcref CATALOG "&fname" ;
%INCLUDE msrcref ; /* Include and execute macro sources */
%LET eod = %SYSFUNC(FETCH(&dsid)) ; /* Read next observation */
%END ;
%MEND ;
Retrieving information from the SASHELP.VCATALG as above rather slow and
I'm sure there's some better way to recompile them.
Regards, Frederik
______________________________ Reply Separator _________________________________
Subject: SAS Macros in work catalog
Author: Gregory Weber <Gregory_T_Weber@SBPHRD.COM> at internet
Date: 12/4/97 4:14 PM
To: SAS-L@AKH-WIEN.AC.AT@INET
cc:
From: Gregory T Weber @ SB_PHARM_RD
Date: 04-Dec-97 09:14:51 PM
Subject: SAS Macros in work catalog
Categories:
Folks,
Does anyone know how to force SAS to recompile macros that are in the work
catalog? As I am testing my macro code in display manager, it would be
great not to have to manually delete them after each run. I am pretty sure
there is a way to do this.
Greg Weber
|