My question here is pure curiosity as I have found a workaround. No
urgency.
In a dataset I have, I need to replace zeros with "missing" for all
variables in the dataset.
A recent statalist exchange suggested the use of recode with a foreach
loop. That suggestion was to turn a missing value into zeros --- the
reverse of what I'm after --- so I tried to adapt the suggestion:
recode myvar (mis = 0)
The reverse:
recode myvar (0 = mis)
But that and other similar attempts failed. The "dot" sysmiss approach
worked, so that's what I'm using now: