SAS Programming

How do you program SUMIF and COUNTIF, into SAS, using the logic from MS Excel?

Here is a little example I created.

[TABLE=“width: 302”]

Mother

Child
Child’s Age
Count of Kids
Sum of Ages

Sheila

Edward
20
2
37

Sheila

Tony
17
2
37

Sally
Otis
3
1
3

Gina
Rosie
15
3
45

Gina
Mary
12
3
45

Gina
Ben
18
3
45

I want to be able to produce coulmn 4 and 5 using SAS.

Re: SAS Programming

...
I used this code for "Count" ... will report back for sumif too

=COUNTIF(A2:A7, A2)

Where A2 is the name of the mother. You have to change it for each row