The note I referred to shows exactly the sort of comparisons you seem to want in your original post. Please look over the examples. The SLICE, LSMEANS, and LSMESTIMATE statements work the same way in any modeling procedure that supports them.
slice group*sex / sliceby=sex;
and
slice group*sex / sliceby=group;
Note that you need to use PARAM=GLM (not REF) in the CLASS statement to use SLICE, LSMEANS, or LSMESTIMATE. See the documentation of the SLICE and LSMEANS statements in your modeling procedure to see the additional options that are available.
... View more