Hi Sir, I am trying to concatenate all the rows from each group. I have written a code from which I am getting my desire result in last line(using last.) but problem is , it is only keeping up to 32767 characters. I am looking for a solution, if the character limit reaches 32767 then in the next variable (column) the remaining character should add. I am using the below code but it is not spiting into different variable if limit reaches. I have attached the result. Any help will be appreciated. Many thanks in advance. data part4 (keep=DOC_NUMBER original_variable count); set part3; BY DOC_NUMBER; if FIRST.DOC_NUMBER then Count = 0; Count + 1; run; data part5; length concatenated_field $ 32767; retain concatenated_field; set part4; by DOC_NUMBER; if first.DOC_NUMBER then do; concatenated_field = original_variable; end; else do; concatenated_field = catx(', ', concatenated_field, original_variable); end; run;
... View more