In the BI platform you generally store this kind of calculation in an Information Map. However, in BASE SAS, you would accomplish this reusability of code or calculation with a SAS macro variable or a SAS macro program. In upcoming releases of SAS, you would be able to design your own functions.
This however, is neither an ODS question or a reporting question -- but is more a SAS macro question. As such, your best bet for a complete response is SAS Tech Support.