class blk A B; model totbr bearbr totalflower totfruit totseed seedwt filseed hunsedwt=blk A blk*A B A*B; test h=A e=blk*A; test h=blk e=blk*A; lsmeans B/pdiff; lsmeans A/pdiff; run; proc sort data=yield; By A; proc glm; class blk B; model totfruit totseed seedwt=blk B; means B/lsd lines; by A; run;