I need help creating new variables using macros. Below is my dataset. The objective variables are character variables. I need to run a macro that searches each objective variable and creates a corresponding variable. event objective1 objective2 objective3 lecture 1_6 4_2 7_8 lecture 3_7 5_3 small group 8_2 6_2 The macro would search each objective variable. For example... If Objective1= 1_6 then do; Example1_6 = 1. end; Desired Results event objective1 objective2 objective3 Example1_6 Example4_2 Example7_8 Example3_7 Example5_3 lecture 1_6 4_2 7_8 1 1 1 lecture 3_7 5_3 1 1 small group 8_2 4_2 1 Does anyone know how to create code for this?
... View more