I want to combine below table.
In table is as
ColA |
ColB |
ColC |
India |
Yes |
15 |
India |
No |
17 |
Europe |
Yes |
13 |
Europe |
No |
20 |
Output should be
ColD |
ColC |
India |
|
Yes |
15 |
No |
17 |
Europe |
|
Yes |
13 |
No |
20 |
Kindly suggst SAS code
Since a dataset with this layout is useless for further analysis work, I ask again (like in your other thread): is this supposed to be a report? And how is such a report to be distributed?
There is no REPORT statement, but there is a REPORT procedure.
You can use PROC REPORT directly off your dataset:
data have;
input
ColA $
ColB $
ColC
;
datalines;
India Yes 15
India No 17
Europe Yes 13
Europe No 20
;
proc report data=have;
column cola colb colc;
define cola / group noprint;
define colb / group;
define colc / analysis;
compute before cola / style=[textalign=l];
line cola $8.;
endcomp;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.