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