Compute variable drawn from empirical distribution

#1
I am trying to compute a variable whereby I replace a value (9) in an ordinal variable with a randomly generated value drawn from an empirical distribution while keeping the other values (1-4) the same as the original variable.

I can accomplish this in SPSS if a theoretical distribution matched my data, such as:

DO IF Q10_D=9.
COMPUTE Q10D_RI = RND(RV.LNORMAL(2.683,.378)).
ELSE.
COMPUTE Q10D_RI = Q10_D.
END IF.
EXECUTE.

Any suggestions?

Bill