Hello All,
I have two different datasets that provide info on claim amount paid by two different sources. Each set includes the claimant name, the date of incident, and the amount paid. So let's say Name1, Date1, and Paid 1 are fields in Set #1, and Name2, Date2, and Paid2 are fields in Set #2. Each of the two sets includes other fields that are not totally identical. What I need to do is to find out those claimants who are in both sets of data, i.e., Name1=Name2, and were injured on the same date and so Date1=Date2, and then create a new field named as TotalPaid = Paid1+Paid2. That is, I need to find out the total amount of paid for each claimant from both sources. For those claimants exist only in one and not both sets, then TotalPaid=0. The rationale of using these two conditions to set up the new field is because it is not likely that two individuals who got injured on the same date will have the same name. How can I do that? Thanks for helping.
Post sample data and expected output - not real data because you obviously can't release that, but some data that's similar to what you have, especially if you want code.
Things that are unclear in your current question:
Otherwise this is most likely more easy to accomplish in SQL though a data step merge is also possible.
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.