@Tanvi99 wrote:
exactly, it is not compressing the space. not sure why
Your source variable contains spaces, and these end up in the macro variable. That's why we make use of trim() and strip() functions to get rid of these blanks.
By having your source dataset sorted along your sub_channel, you can do all your processing using "by" in one step.
If your analysis is more complex, let us know, but my data-step created split should work.
It would also be of great help if you supplied example data in usable, unambigious form (data step with datalines, see my code example).
... View more