NOTES AND DISCLAIMER:
This macro is written to run in SAS windows environment.
It runs with SAS 9.2 or higher.
The code is provided as an example for an utility macro.
It can be modified to suit your purpose.

Download the code file

or

view the raw code in your browser