%macro SalvageValue(_origAmt, _DepRate, _YrsOut, _MySalvValue); /**************************************************************************************/ /* Name: SalvageValue.sas Auth: Phil Rack */ /* Date: 5/18/2007 Revd: */ /* */ /* Desc: Calculates the salvage value of an item at the end of a given year. */ /* */ /* Where: _origamt = original price. */ /* _deprate = the depreciation rate. */ /* _Yrsout = Year of depreciation. */ /* _MySalvValue = the calculated salvage value (returned value) */ /* */ /* Copyright (C) 2007 by MineQuest, LLC. All Rights Reserved. www.minequest.com */ /**************************************************************************************/ IF (%length(%str(&_origamt)) eq 0) OR (&_origamt = '.') OR (%length(%str(&_Deprate)) eq 0) OR (&_Deprate = '.') OR (%length(%str(&_YrsOut)) eq 0) OR (&_YrsOut = '.') THEN DO; &_MySalvValue = .; END; ELSE DO; &_mySalvValue = &_OrigAmt * ((1 - &_DepRate / 100) ** &_YrsOut); END; /********************************************************************************************/ /* SalvageValue is Copyright (c) 2007 by MineQuest, LLC. All Rights Reserved. */ /* MineQuest, LLC, 1939 Queensbridge Dr., Columbus, OH USA. */ /* This Macro Program is proprietary software and is licensed property of MineQuest, LLC. */ /********************************************************************************************/ %mend SalvageValue;