drop if mod(var1,3)==0 or, if you want to keep a record gen byte wanted=mod(var1,3) drop if wanted==0
keep if mod(var1, 3)
Comment