02-12-2013 05:07 AM
|src Col||seq no|
Based on one of the source columns, a sequence no has to be generated. If the source value changes, then the sequene no must start from one.
Is this is possible in SAS DI without using user-written transformation?
02-12-2013 05:23 AM
Not really, maybe by using some extensive logic using Group By and monotonic(), but that would probably be more difficult to understand, than a simple user written using by - first. logic.
02-12-2013 07:49 AM
I am not sure if it is possible to get the seq no as you want in DI studio without coding. May be other members can you help you if they have come across similar situation.
Here is a small piece of code which i hope can help you
input src_col $;
proc sort data=want;
if first.src_col then seq_no=1;