hi,
i just want to know that how to create a Unique ID in the data set using two variables in the data set using TRIM and double pipe function ?
please give me the code ?
thanks
sas_learner
Find a character which doesn't occur in your vaiables, such as "@", and create your unique ID as
length uniqueID $20; /* To be adjusted */
uniqueID = catx("@", var1, var2);
I'm confused, it sounds like you know what you want, are you having issues creating the variable?
If so, post the code you've used and are having issues with. I'm also uncertain as to what you mean by double pipe function.
There is a double pipe that is used to represent concatenation, but in my opinion, the CAT family of functions are better, especially since they'll do things like trim by default (CATT).
Find a character which doesn't occur in your vaiables, such as "@", and create your unique ID as
length uniqueID $20; /* To be adjusted */
uniqueID = catx("@", var1, var2);
hi,
using when-select statements, how can we define a new variable providing the country of each model based on the manufacturer.??
thanks ,
@Prateek1 Please post your question as a new topic.
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!
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.