Hi everyone, I'm new with SAS and I am trying to transpose multiple variable from wide to long, as in the example mention below The A,B,C is the prefix followed by time (year). ID Name FirmID A1981 A1982 ... B1981 B1982... C1981 C1982... 1 x 123 2 3 4 5 6 7 2 y 124 22 33 44 55 66 77 3 z 555 222 333 444 555 666 777 I don't know how to use prefix (A,B,C) and transpose by year. In addition, is there any code so that I can combine to transpose to multiple variables by year, or I have to do that for 3 times from wide to long (one for A, one for B, and one for C)? This is the data I want to get: ID Name FirmID Year A B C 1 x 123 1981 2 4 6 1 x 123 1982 3 5 7 ....... 2 y 124 1981 22 44 66 2 y 124 1982 33 55 77 ......... 3 z 555 1981 222 444 666 3 z 555 1982 333 555 777 I'm appreciate any help 🙂
... View more