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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1254 views
  • 3 likes
  • 5 in conversation