BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Haikuo
Onyx | Level 15

And of course, I conveniently forgot mentioning the memory limitation on Hash(). LOL.

Haikuo

Haikuo
Onyx | Level 15

,

It is not uncommon that the examples presented in original posts are highly simplified. Many, including me, do believe it is also the case for this one, even though OP did not explicitly spell it out. This will also involve how you define a practical "robustness". What if you don't know the value of "class"? what if "class" has 10,000 distinct values? These are legitimate  questions that deserver more consideration.

Haikuo  

PaigeMiller
Diamond | Level 26

Valid points by and , however it seems to me you might want to explicitly state that this is a "generic" solution that will work in all examples, even if there are an unknown number of CLASS distinct values. If the question was from someone who truly is a beginner asking a beginner question, then I think you have confused this person.

--
Paige Miller
Haikuo
Onyx | Level 15

Agreed. Although I believe all of us volunteering on this forum are trying our best, but there always is room of improvement.

Scott_Mitchell
Quartz | Level 8

I think it is important to understand that there is no possible way that we can understand every limitation imposed upon the OP.  I think we should provide as many solutions as possible so that the OP can test each scenario on their particular system in their particular workplace for their particular input dataset.  's solution is easily best combination of flexibility and efficiency - however I have worked in teams where the Manager refused to allow us to use HASH OBJECTS because he didn't understand them, a similar restriction was applied to SQL by another manager I worked for, therefore CALL EXECUTE, although less efficient in many instances - it can be slightly more efficient with smaller datasets - allowed me to work around these issues.  Furthermore, I have had a few issues with HASH OBJECTS and memory that I couldn't work around or that made the process less efficient.

It is now up to the OP to decide what method suits their particular circumstances.  Hopefully his request allows him to use a simple datastep as you have suggested, but in case it isn't, he has plenty to work with and test from the above contributors.

jakarman
Barite | Level 11

Hello guys, No need for a fire.
Many times it can also make fun just playing arround with the options and being inventive.
Learning from each other.  There are a lot hidden parts even if you think you knew all.   

By the way... where is "nonsleeper" seems to be sleeping 

---->-- ja karman --<-----
Haikuo
Onyx | Level 15

LOL. I see no fire, just some sparkles of thoughts.

ballardw
Super User

I would at this point also ask, what is being done with the subsets? It may be that analysis could very well be done using the CLASS statement in an analysis procedure and no need for separate datasets.

NonSleeper
Quartz | Level 8

I had no idea that question has led to all these solutions (though my expertise allows me to understand but one) and interesting discussions. SAS is characterized by tremendous flexibility and maybe that's why. I'd leave every philosophical thought to you; just one thing yet, it's a simple question as it appears at the first place. Thanks for all the help.

Jaap Karman I'm essentially nonsleeper in daytime Smiley Happy

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
  • 23 replies
  • 1918 views
  • 3 likes
  • 9 in conversation