Hi, I want to combine these datasets but if I join on SOC and PT, I only get respiratory disorders and I need infections and infestations and general disorders as well. Can anyone help? I tried Cartesian join but that didn't produce what I wanted either.
Yeah, well I actually ended up doing something in SQL. I'm sorry that you have such a problem with my post but my organization uses Citrix and it is much faster to upload pictures. Also, you can click on pictures to enlarge them. Getting my code out of SAS requires using an SFTP twice. Anyway, I found a solution on my own.
@tarheel13 wrote:
Hi, I want to combine these datasets but if I join on SOC and PT, I only get respiratory disorders and I need infections and infestations and general disorders as well. Can anyone help? I tried Cartesian join but that didn't produce what I wanted either.
Since you do not show anything labeled SOC or PT then I don't see how you combine them on those. I also don't see any "infections" or "infestations" so that is bit problematic as well.
So perhaps show the code you used to attempt this "combine". And the contents of both of those examples look to be the same, so wondering what any combining is supposed to yield.
Can you show what you expect the result to look like?
There is a label on the SOC variable but is the one that says System Organ Class. I think I found a solution for now. But if someone has something more elegant, I would love to know. This is my ugly solution. I don't like it because I have to output 3 datasets and stack them in another dataset. However, I need to make this pretty quickly so going to continue with it for now I guess.
@tarheel13 wrote:
There is a label on the SOC variable but is the one that says System Organ Class. I think I found a solution for now. But if someone has something more elegant, I would love to know. This is my ugly solution. I don't like it because I have to output 3 datasets and stack them in another dataset. However, I need to make this pretty quickly so going to continue with it for now I guess.
Since you do not show any labels for any variable it is hardly to be expected for anyone to know where to find SOC or a possibly mythical System Organ Class.
We can only use the information you show us.
And if you look closely at your original post there is no variable AETERM_SOC that you are using in that code. Or the Label. Or the "System Organ Class".
PLEASE post code as text in a code or text box opened on the forum with the </> or "running man" icons. Pictures are hard to read, cannot be copied and pasted into an editor to run code or edit to show suggested changes.
Yeah, well I actually ended up doing something in SQL. I'm sorry that you have such a problem with my post but my organization uses Citrix and it is much faster to upload pictures. Also, you can click on pictures to enlarge them. Getting my code out of SAS requires using an SFTP twice. Anyway, I found a solution on my own.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: