Based upon the description provided of the behaviour of the variables in the PDV and the effects of the DATA and SET statements, one must ask why the value of the Y variable of the fifth observation in the FINAL output dataset in the first example, where the IN= option is not used, is missing and not 999. As per the description, Y is retained, as proven by observation 8, and it is 999 after processing observation 4, so what made it become missing when it was not read to process observation 5, which is the first observation of the B dataset and which does not contain variable Y.

Cheers