| Date: | Wed, 21 Aug 2002 16:24:55 +0200 |
| Reply-To: | Lex Jansen <news@UNSPAMLEX-JANSEN.DEMON.NL> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Lex Jansen <news@UNSPAMLEX-JANSEN.DEMON.NL> |
| Organization: | Posted via Supernews, http://www.supernews.com |
| Subject: | Tip: HotFixes |
|---|
In an environment where validation and change control are important I create
a macro, %_HotFix, and put the following statements in my AUTOEXEC.SAS to
keep track of installed Hotfixes:
%PUT NOTE: HotFixes installed:;
%PUT %_HotFix;
%PUT;
Which would give in the SAS LOG, for example:
NOTE: HotFixes installed:
82BA36WN 82BA47WN 82BA53WN 82BA59WN 82BA62WN 82BA63WN 82BA73WN 82BA74WN
82BA78WN 82BX01WN 82OC01WN 82OC02WN 82PF01WN 82ST08WN 82ST09WN
Any suggestions or comments are very welcome.
Lex Jansen
======== MACRO _HotFix ====================
%macro _HotFix / des='List installed Hotfixes';
%local _HotFix filrf rc did memcount member i;
%* This macro only works on Windows and SAS version at least 8;
%if (&sysscp NE WIN) or (%scan(&sysver,1,.) LT 8) %then %goto endmac;
%let _HotFix=;
%let filrf=MYDIR;
%let
rc=%sysfunc(filename(filrf,%sysfunc(sysget(sasroot))\core\sasinst\hotfix));
%let did=%sysfunc(dopen(&filrf));
%if &did %then %do;
%let memcount=%sysfunc(dnum(&did));
%do i=1 %to &memcount;
%let member=%sysfunc(dread(&did, &i));
%if %index(%upcase(&member), .AUD) > 0 and
%index(%upcase(&member), AUD.00) = 0 /* Double installed HotFix
*/
%then %let _HotFix=&_HotFix %upcase(%scan(&member,1,.));
%end;
%let rc=%sysfunc(dclose(&did));
%end;
&_HotFix
%endmac:
%mend _HotFix;
======== MACRO _HotFix ====================
|