Here is an explanation of the markup used in this forum.
Regarding your question about sorting, when ORDER=INTERNAL you're asking PROC REPORT to sort based on the numeric values of the variable. In that case, -1 < 7 so of course -1 sorts before 7. When you change to FORMAT=best9. and allow the ORDER= to default to FORMATTED, PROC REPORT format the values and produces the character strings "-1" and "7". The rows are then sorted by these character strings. In this case, the character string "7" precedes the character string "-1", so "7" sorts before "-1".
Try this simple experiment:
[pre]
data test;
n = -1;
c = put(n, best9.);
output;
n = 7;
c = put(n, best9.);
output;
run;
proc sort data=test out=internal;
by n;
proc sort data=test out=formatted;
by c;
title 'sort by numeric value';
proc print data=internal;
run;
title 'sort by formatted value';
proc print data=formatted;
run;
[/pre]