Rick is right, the by statement is not what you want. As you know, MCMC is essentially a programming language for Bayesian analysis. The programs can be quite complex, and it is hard to give specific advice ahead of time. THe following article might help you with the "missing value" part of your problem.
http://support.sas.com/resources/papers/proceedings13/436-2013.pdf
... View more