Hi SAS Community - I'm relatively new to SAS and I don't have much experience moving data around within tables using a data step. I'm trying to go from the Beginning table to the Ending table as seen below. Essentially, variables A_ and B_ have the same EX_Date, Sales_Date, SerialNo, and Price. I want to move A_ and B_ under the headings 1, 2, and 3 so that the data is organized by 1, 2, and 3. Is there a specific function within a data step that can help with this? Would Array work? Any help is greatly appreciated. Beginning Table Ex_Date Sales_Date SerialNo Price A_1 A_2 A_3 B_1 B_2 B_3 20121001 20130119 Serial 01 1250 15 79 10 352 259 288 20121001 20130119 Serial 02 1250 34 82 1 496 475 239 20121001 20130119 Serial 03 1250 48 33 15 106 232 377 Ending Table Ex_Date Sales_Date SerialNo Price 1 2 3 20121001 20130119 Serial 01 1250 15 79 10 20121001 20130119 Serial 01 1250 352 259 288 20121001 20130119 Serial 02 1250 34 82 1 20121001 20130119 Serial 02 1250 496 475 239 20121001 20130119 Serial 03 1250 48 33 15 20121001 20130119 Serial 03 1250 106 232 377
... View more