In reply to Hanika.

Hanika, a little more complex. One approach is to use PROC FREQ to generate all of the combinations of the two values, and then use that data to generate WHERE clauses for each target data set.