I gave an answer previously for this problem. Repeated here.
Here is one way.
You can use ods output to create a sas file for each relevant part of the output from a procedure. For instance, you could use:
proc glimmix ;
ods output tests3=tests3;
class trt b ;
model y = trt|b;
run;
to store the Type 3 test results in a file called tests3 (these are the F tests, degrees of freedom, P values). The p value is called ProbF in this file (just print it to check this out). Then in a print procedure, you can choose a different format for ProbF. Below is one way, where I request 12 decimal places for P.
proc print data=tests3;
format ProbF pvalue15.12; *<--no space in pvalue15.12 ;
run;
The relevant ods file is different for each procedure. Check the documentation for your desired procedure.
Usually, one does not need to know p to more than 5 or 6 decimal places. But it does come up with multiple testing problems, where one wants to adjust the p values for multiple testing. Then, it can be useful to see more than 5 or 6 decimal places.