You don't have to, because PROC GLMMOD will generate the design matrix for you. For example,
/*
data plants;
input Type $ @;
do Block = 1 to 3;
input StemLength @;
output;
end;
datalines;
Clarion 32.7 32.3 31.5
Clinton 32.1 29.7 29.1
Knox 35.7 35.9 33.1
O'Neill 36.0 34.2 31.2
Compost 31.8 28.0 29.2
Wabash 38.2 37.8 31.9
Webster 32.5 31.1 29.7
;
ods output designpoints=X(drop=obsnumber stemlength);
proc glmmod;
class Block Type;
model StemLength = Block Type;
run;
ods output parameterestimates=b(keep=estimate) predictedvalues=yhat;
proc glm data=plants;
class Block Type;
model StemLength = Block Type/p solution;
run;
proc iml;
use x;
read all var _num_ into X;
use b;
read all var {estimate} into b;
yhat = x*b;
b1 = b;
b1[5:11]=0;
yhat1 = x*b1;
print b b1;
print yhat yhat1;
quit;
*/
where b are the estimates of intercept, block, and type; yhat=X*b are the predicted values using both block and type; b1 are the estimates of intercept and block only; yhat1 = X*b1 are the predicated values using block only.
reference:
http://support.sas.com/kb/23/217.html