Prev: Help on Creating single observation from multiple observations
Next: Creating a new variable using multiple overvations
From: StorageDevil on 21 Apr 2010 17:59 Hi Der do we need to do something to a macro if we have written it newly in SAS. %macro volsla; Select; When (Storgrp eq 'DB2SRTD') SLA_Util = 92; When (Storgrp eq 'DB2SRTP') SLA_Util = 98; When (Storgrp eq 'OPSNSRDF') SLA_Util = 60; When (Storgrp eq 'OPSPRIME') SLA_Util = 90; When (Storgrp eq 'SASPRIME') SLA_Util = 85; When (Storgrp eq 'SCRTCHSD') SLA_Util = 90; When (Storgrp eq 'TINBATCH') SLA_Util = 85; When (Storgrp eq 'TINPRIME') SLA_Util = 90; When (Storgrp eq 'TSOPRIME') SLA_Util = 90; When (Storgrp eq 'TSOSMALL') SLA_Util = 90; When (Storgrp eq 'TSTPRIME') SLA_Util = 95; When (Storgrp eq 'USRPRIME') SLA_Util = 85; Otherwise SLA_Util = 80; End; Label SLA_Util = 'SLA*Util%'; %mend; This macro is running fine and I have a need to make a change to it to make it to 60 for OPSNSRD. But anyhow it is stored in a new member and not the old member so I call it volslaI This is my sas code: Data Storgrp; Set VOLSUM; File ALRTLOG; %VOLSLAI; /* SLA_Util for storage group set in macro */ If MeanPct < SLA_Util Then Delete; Put @01 Date date9.0 @11 Time time5.0 @18 Storgrp $8.0 @27 SLA_Util 3.0 @32 MeanPct 3.0 @38 '/' @41 Num_Vols 3.0 @48 Sum_Capa 4.0 @54 Sum_Aloc 4.0 @60 MeanFree 4.0 @67 Larg_Ext 4.0 ; Now IT S JUST AN ASSUMPTION THAT MEANPCT is 82 and SLA_UTIL is now 60 so can some give any suggestion as to what am I doing wrong here... |