i have a problem that probably very simple but i can't figured out.
i have columns name1 c1 c2 c3 c4 .... c8
i have to sum by names these columns and make a new data.
Here is the code that i wrote but it didnt work.
Could you please help me?
PROC SQL;
CREATE TABLE WORK.data1 AS
SELECT t1.name1,
%let k=8
%macro test;
%do i=0 %to &k;
%sysfunc(SUM(C&i)) AS C&i;
%END;
%mend test;
%test;
FROM WORK.data t1
GROUP BY t1.name1,
QUIT;