All "don't know" and "refused" are converted to null = missing.
If q1smo = 1 then q2smo is not asked and it will be null.
smkhist = null
if q1smo = 1 then smkhist = 3
else
if (q1smo = 2 and q2smo = 1) = smkhist = 2
else
if (q1smo = 2 and q2smo = 2) then smkhist = 1