how to use Group by function in data step
There is no such thing as a GROUP BY in a DATA step. A roughly equivalent functionality for data in a SAS data set is PROC SUMMARY.
If you mean BY group processing it depends on what you're trying to do.
Here's the documentation referencing what BY group processing does in SAS.
@BrahmanandaRao wrote:
how to use Group by function in data step
@Kurt_Bremser wrote:
I guess you want to know what the BY Statement does.
Well, this is what happens when the original poster writes such a brief description that it could mean just about anything, and I interpreted not as a question about BY statement in a DATA step but can the SQL command GROUP BY be used in a DATA step. But, I don't really know. We're all guessing, and that's not good.
So, @BrahmanandaRao, please explain what you are talking about, in sufficient detail (and trying to avoid your extreme brevity) that we all know clearly what your question is. In fact, as a general request to you, @BrahmanandaRao, now and in the future, write clear questions that are detailed enough so that we don't all go in different directions and so that we don't have to ask a lot of follow-up questions.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.