Hi, I have a string variable of up to length 24 which represents different scores (from 0-9) for 24 months. Var = "0000000134564388889..." I need to create 72 variables that are 1 or 0. i.e score_1 will be 1 if the first number in the Var string is >=1 and 0 if not. score_2 will be 1 if the second number in the var string is >=1 and 0 if not, and so on. I'll then sum the variables for each month using something like this to get a sum of the observations that were >=1 at each month: proc summary data = data (keep=score_1-score_24) nway missing ; var score_1-score_22; output out = data_out (drop= _type_) sum= ; run ; Thanks in advance!
... View more