Hey everyone! Thanks for checking out my video on concatenation. I got an email from SAS Technical Support that pointed out one inaccuracy. In my very first example, even though it *looks* like there is a space between "Age:" and the persons age, it actually got trimmed out by the CATS function. If you *really* want a blank space after "Age:" you could use just the CAT function like this: combo = cat(trim(name), ', Age: ', age); This example uses the trim function to get rid of any extra blanks in the name, but respects the one after "Age:". Enjoy! -Andy
@negusuworku23752 жыл бұрын
Thank you. Very help full. I was laughing when you said no dog function......smile...
@SASUsers2 жыл бұрын
Glad you found it helpful! 🐶
@savannah591111 ай бұрын
good video i learned a lot thanks hank
@bikusbikus11 ай бұрын
🌽
@SASUsers11 ай бұрын
Thanks for tuning in!
@rogerward80474 жыл бұрын
This is excellent, Andy! I am glad you did this tutorial.
@andyravenna42224 жыл бұрын
Thanks Roger!
@djrisks4 жыл бұрын
Great video Andy!
@andyravenna42223 жыл бұрын
Thank you Kriss!
@Mgilsy3 жыл бұрын
Great video. Thanks. Love the extra tips at the end.
@SASUsers3 жыл бұрын
Glad it was helpful!
@thepineweaver3 жыл бұрын
Super helpful!
@SASUsers3 жыл бұрын
Awesome! Glad you enjoyed it!
@bifurkacia2 жыл бұрын
Great tutorial, thank you!
@SASUsers2 жыл бұрын
Glad it was helpful!
@zahirraihan80 Жыл бұрын
Excellent!!
@SASUsers Жыл бұрын
Glad you like it!
@oluwafemijohnson84222 жыл бұрын
Hi Andy, thanks for this video. I found it very helpful. Please, I need your help to solve a problem I had after I concatenated "Lastname, first name and middle name. I want middle initials. e.g., Johnson, Smart B. However, I was successful doing that but I have two different people in different departments with the names (e.g., Smith, Johnson L maybe in English dept and another person bearing the same Smith, Johnson L in French Dept). Please how can I solve this problem before joining the data set?
@SASUsers2 жыл бұрын
Oluwafemi, We can't answer detailed usage questions or provide code here in the KZbin feedback area. For usage questions about SAS procedures and your data, your best resources are either Tech Support or the SAS Community Forum. To open a track with Tech Support, fill out the form at this link: 2.sas.com/6055KQyt1 . For help from SAS employees and users, you can post general questions in the Statistical Procedures forum: 2.sas.com/6056KQytG
@ernestcpena6 ай бұрын
Andy!!!
@ToOpen6seven8 ай бұрын
How would you put together two vars - one has the numeric value of 99 and the other contains numeric vals of (1,2,3, etc.) I want the new var to be 99.01 or 99.02 etc.
@SASUsers8 ай бұрын
For programming/content related questions, we'd recommend posting on SAS Communities where experts are on hand to help with usage recommendations 2.sas.com/6052njLmw
@bailandoasolas3 жыл бұрын
Hey Andy, great video. But I have a question, how can I do when I have a character like this: $390,000? Regrets from Mexico
@SASUsers3 жыл бұрын
Brenda, thank you for your inquiry! We are checking on this for you!
@SASUsers3 жыл бұрын
Brenda, This video shows how to use the concatenation or CAT family of functions (like CAT, CATS, CATT, CATX). The CAT family of functions will work with both numeric and character values. Your question is not entirely clear. If you want to concatenate a character variable that holds the value of $390,000, that should not be an issue at all with the CAT functions. For example, to concatenate a character variable and a numeric variable, you can see an example of this in the very first example in the video on using the CATS function, at approximately time stamp 04:00 where the variable NAME and AGE are concatenated. If you have a numeric variable that contains the raw data value 390000 and you want to add dollar signs and comma separators while you also concatenate, then you would have to use a PUT function nested inside your CAT function. We teach about the PUT function in our Programming 1 and Programming 2 classes. This KZbin feedback area really doesn't allow us to post code or screen shots. Your best resources for questions like this are to either open a track with Tech Support or to post your question in the SAS Community Forums, with more details about your question. The SAS Programming forum 2.sas.com/6059H2T5H would be a good place to start with a question like this.
@sagarkothari58982 жыл бұрын
How would I run the same query when I want to keep all the columns of the said file and Add the additional concatenated column in the same file
@SASUsers2 жыл бұрын
Checking on this for you!
@SASUsers2 жыл бұрын
Unfortunately, we can't post code or screenshots in this KZbin feedback area. But we can give you some idea of how to keep all the variables from the input dataset, along with the new variable from the concatenation. It involves just using basic SAS coding techniques. Consider the code at time stamp 2:41. In that code snippet, the narrator is creating 2.sas.com/6055zAzp5 and the KEEP= option is only going to cause only 1 variable (COMBO) to be saved in 2.sas.com/6055zAzp5. Without the KEEP= option, ALL the variables in SASHELP.CLASS plus the new COMBO variable would be written to 2.sas.com/6055zAzp5. This is one of the fundamentals of SAS programming -- using DROP and KEEP to control variables in the output data set. If you have further questions about concatenating variables and writing SAS code, your best resources will be to post a question, with some sample data in the Community Forums, such as the Programming forum, here: 2.sas.com/6056zAzpg.
@andyravenna42224 жыл бұрын
I hope you enjoy learning about the CAT function (while seeing some other cats!) Please do let me know if you have any comments or questions. Thanks! Andy
@aswinip75794 жыл бұрын
Can you please make a video on proc template.
@SASUsers4 жыл бұрын
Aswini, thanks for your feedback! You may also find this paper helpful 2.sas.com/6050GLweq