Code: Select all
genr uniquedum = 1
for !a = 2 to @obsrange
for !b = !a-1 to 1 step -1
if name(!a) = name(!b) then
uniquedum(!a) = 0
!b = 1
endif
next
!c = (!a/@obsrange)*100
statusline !c % filtering of unique values
next
pagecontract if uniquedum = 1
Help appreciated as always! Best wishes to all.
Charlie
**************EDIT**************
This is faster, but I feel that it can be faster still....:
Code: Select all
svector unique_svector=@uniquevals(name)
for !a = 1 to @rows(unique_svector)
for !b = 1 to @obsrange
if unique_svector(!a)=name(!b) then
uniquedum(!b) = 0
!b = @obsrange
endif
next
!c = (!a/@rows(unique_svector))*100
statusline !c % filtering of unique values
next
pagecontract if uniquedum = 1