You're welcome.
Just in case some of the "applicable conditions" mentioned in my comment (in the WHERE statement) require more complicated coding, this could be done in the previous DATA step creating view _TMP. For example, if there was no post-baseline flag available in dataset HAVE (only a baseline flag like ABLFL), it could be created in that DATA step.