You should take a look at the SAS/STAT manual under PROC FREQ (I don't have
the exact reference to hand). p-values are not exact but it does give an
example of Friedman's test.
> From: Werner E. HELM
> To: Multiple recipients of list SAS-L
> Subject: FRIEDMAN-TEST ?????
> Date: 02 October 1996 10:11
> Dear statisticians on sas-l :
> Is there somewhere in SAS the FRIEDMAN (1937) rank analysis of
> or FRIEDMAN-TEST for several paired samples (block experiment) directly
> available (exact p-values for small samples) or has it to be programmed
> each user ??????
> It's not in NPAR1WAY or MULTTEST (as I believe), NPAR2WAY does not exist