Hello Statalist

I need help on how i can recode multiple observations to missing. In the data example below welfare is a clone of var5, but i only want observations with certain values to be cloned. Also, i want the values in welfare to be set to missing in var5.

I am aware of the recode var5 (1/2=.), generate(welfare) command, however, this command only seems to work with two values. Thus, i cannot write recode var5 (1/2/3=.) as stata tells me "unknown el / in rule r(198);". It also doesnt set the values in welfare to missing in var5.


Any help is much appreciated!

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input byte(var5 welfare)
 6  6
 9  9
10 10
24 24
23 23
 4  4
18 18
15 15
18 18
 7  7
18 18
 7  7
 6  6
 4  4
10 10
11 11
 2  2
23 23
 5  5
 5  5
end