BookmarkSubscribeRSS Feed
ballardw
Super User

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.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 3660 views
  • 3 likes
  • 5 in conversation