Every portion of the output has a corresponding ODS table name. Go to the documentation for GLM and find "ODS Table Names". Using the ODS OUTPUT statement, you can direct SAS to create data files for each desired table within the output. The example below creates the MA file for the Type 1 and 3 test statistics (plus p-values, etc.; with a separate record for type 1 and type 3), and the LS file for the least squares means. Note: the names on the left-hand side of the = come for the ODS Table Names; the names on the right-hand side of = are arbitrary. Using PRINT, you can see how SAS stores the values. With programming steps, you could then delete either the type 1 or type 3 record (depending on the hypothesis you cared about), and then continue with other procedures.
However, I don't know why you would want to use PROC MEANS here, considering that you can easily use the LSMEANS (or even MEANS) statements right in GLM.
data t;
input trt y;
datalines;
1 1
1 2
1 2
2 6
2 5
2 4
3 2
3 3
3 4
;
proc glm data=t;
ods output ModelANOVA=ma LSmeans=ls;
class trt;
model y = trt;
lsmeans trt;
run;
proc print data=ma;
proc print data=ls;
run;