The data you show us are all strings but you want to use the digits of column '3' as numeric values and sum them up. Not sure if your real data looks as posted or if this is already formatted data.
It would help in the future if you could post a proper SAS data step which creates sample data together with a description of how the expected result should look like. This way you're taking out the guess-work for us and you also have a better chance to get an answer which fits your actual data.
Below some code which deals with the data as posted.
infile datalines truncover dlm=',' dsd;
input (person household wages) (:$20.);
Person 1,Household 1,Wages - 10
Person 2,Household 2,Wages - 10
Person 3,Household 1,Wages - 10
create table want as
catx(' ',household,'Wages',sum(input(scan(wages,-1,' -'),? best16.))) as goal length=40
Sorry, let me try to be more specific. in a different question.
SAS INNOVATE 2024
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.