Hi Rick,

If you use the REMOVE function, which has the ability to both accept a null matrix in the second argument and also return a null matrix if everything is removed, then you can avoid having to check things. One caveat though, you will end up with a row vector.
;
start RTP( N, lambda);
x = j(N,1);
call randgen ( x, "POISSON", lambda);
return( remove(x, loc( x=0 )));
finish;
;
I am looking forward to the next installment, I quite like the idea of setting the probability that my program will crash!