Hi Everyone, I trying to figure out the following problem. At the moment I have a dataset like this Application_id Reaon_code Value 123 AB31AB45 £500 124 AB43RD49TY87 £640 125 RT87 £900 126 CD19RV29 £1000 What I want to get is separate the reason_code variable by taking the subset of this, each reason only has 4 character and combine 2 letters and 2 numbers, always The dataset I want to get is the following Application_id Reason_code Value 123 AB31 £500 123 AB45 £500 124 AB43 £640 124 RD49 £640 124 TY87 £640 145 RT87 £900 Hope this make sense. 2nd question, I want to create a flag showing Application_id Reason_code Value Waterfall_reason Unique_Reason 123 AB31 £500 1 (as it his AB31 first) 0 (as it hits both AB31 and AB45) 123 AB45 £500 0 (as it hits AB31 first) 0 (as it hits both AB31 and AB45) 124 AB43 £640 1 (as it hits AB43 first) 0 (as it hits both AB43,RD49 and TY87) 124 RD49 £640 0 0 124 TY87 £640 0 0 145 RT87 £900 1 (as it hits RT87 first) 1 (as it ONLY Hit RT87) Hope the questions make sense, I'm a new starter using SAS therefore I'm not familiar with complicated logic Thanks for everyone in advance Regards
... View more