Macro replaceprefix: how to modify to pull labels and formats?

I have monthly data collected over two years. The datafiles have M# at the start of some of the variables, but not all of them (some have a different prefix, some have no prefix). I have successfully used the macro in this paper (http://support.sas.com/resources/papers/proceedings09/075-2009.pdf) to strip off the prefix using repeated runs of the macro to capture all of the variables that I need to have the prefix removed from. The problem is that this creates new variables that do not have the labels and formats that were assigned to the original variables. How can I modify this code to pull over the labels and formats as well?