Dear Forum, Thank you very much for your answers so far. It has been very helpful. I would like to ask one more question concerning the transpose of wide datasets to long datasets. I have found very useful information and codes on the internet so far, however, I was wondering whether there is a more efficient code for the length of my dataset. I would like to transpose the following dataset (the original file contains more rows and columns) .... ID set_FY2016 set_FY2017 set_FY2018 track_FY2016 track_FY2017 track_FY2018 Let_FY2016 Let_FY2017 Let_FY2018 1 10 20 5 12 212 3 120 204 53 2 8 0 10 4 3 32 82 3 103 3 5 40 0 55 44 3 523 440 12 ... to achieve the following result: ID Year Set Track Let 1 2016 10 12 120 1 2017 20 212 204 1 2018 5 3 53 2 2016 8 4 82 2 2017 0 3 3 ... ... ... ... ... I was trying to achieve this using the following code. Unfortunately, it returns an error message (maybe a macro can be used?): data Want; set Have; array new {3} Set_ Track_ Let_; array old {3, 2016:2018} Set_: Track_: Let_: ; /*Error Message received here: "To many variables" -- I know I can finish this code by adding theses variables manually, incl. the years , but I would like to loop/macro this process*/ do year = 2016 to 2018; do k=1 to 3; new{k} = old{k, year}; end; output; end; keep ID Year Set Track Let; run; I would really appreciate your advice here - thank you very much for your input. I wish you a nice day Kevin
... View more