Hi everyone,


p1_1 p1_2 p1_3 p2_1 p2_2 p2_3 p3_1 p3_2 p3_3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3
1 1 1 2 2 2 3 3 3


I would like to generate a sum of the values with sequential variable names, using loops.

generate p1= p1_1 + p1_2 + p1_3
generate p2= p2_1 + p2_2 + p2_3
​​​​​​​generate p3= p3_1 + p3_2 + p3_3

Thanks you....