You're not being blunt at all. I'm new to SAS and I REALLY appreciate your help. I see, yes, I need to Merge Have1 and Have2 first to produce the FinalData set. Then I can order the variables. data Agency1 set FinalData retain( Case_Number ID FirstName LastName Q52a: Agency_Name Q57a: Q5 Program_Name Q4 Q64: Age); run; 2. Yes, this is a little confusing (sorry). The data I use comes from excel spreadsheets generated from another database, so I don't have control over how the raw data organized when it comes to me. I have a variable Age which can go up to a value of 10. This variable determines how many extra variables will be included in the dataset. If the max value of Age is 10, 10 Assessment variables will be in the dataset: Assessment1 to Assessment10. If the max value of Age is 4, 4 Assessment variables will be in the dataset: Assessment1 to Assessment4. When i recive the dataset if the max value of Age is 4 there won't be Assessment5, Assessment6, Assessment7, Assessment9, Assessment10 in that particular set. So, there are 10 different possible versions. I wanted to try and write the program so i would not have to change the code to reflect how many Assessment Variables are brought in. Does this make more sense? Thanks so much.
... View more