I am not sure that your response to this question understood what I was asking:
2) describe the exact output desired by the macro. Since your apparent desire is to have random values inserted into the data then there are LOTS of things that would have to be considered, such as what values are assingned to any other variables involved in the data set -
Ans2: I have different formats for each variable passing through the macro. Based on the raw values for each field corresponding formats will be applied
If you have variables a, b, c in the data and you are doing what ever you want to call this process to the data to generate your new dataset with the formatted values of A, what would be the values for variables B and C? If they are not in the result then I submit that proc tabulate may be a valid choice with the OUT= option to create a data set. One of the things in the output is a _type_ variable to tell you which table to select to generate your single variable datasets. But if you need any thing other than the single variable's formatted value and a count you need to be very explicit about where the values for any other variables come from.