The order of variables in an interaction is determined by the order of first appearance of the variables in the CLASS statement, if it is used, or in the MODEL statement. For example, the interaction in these statements
model y = a b b*a;
run;
appears in the results as a*b, not as b*a, as written in the MODEL statement, because a precedes b in the MODEL statement. On the other hand, the interaction appears as b*a, as written in these statements:
model y = b*a a b;
run;
Note, however, that the order in the CLASS statement takes precedence. In these statements the interaction appears as b*a because of the order of the variables in the CLASS statement:
class b a;
model y = a b a*b;
run;