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.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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