data have;
input idt_ixn tsp_deb datetime18. top_dec $ ;
informat tsp_deb datetime18.;
format tsp_deb datetime18. ;
datalines ;
123 10NOV2020:10:10:10 0
123 10NOV2020:11:11:11 1
123 10NOV2020:12:12:12 1
456 11NOV2020:10:10:10 0
456 12NOV2020:11:11:11 0
456 13NOV2020:12:12:12 0
;
hello,
I would like tocreate a flag with value "1" only on the first top_dec =1 of the idt_ixn or on the first idt_ixn when there is no top_dec=1
in this case,
for the group idt_ixn=123, the flag should be 1 only where tsp_deb is 10NOV2020:11:11:11
for the group idt_ixn=456, the flag should be 1 only where tsp_deb is 11NOV2020:10:10:10
thnaks in advance
kind regards
Nass
... View more