KEYLEGEND is not an option on the PROC SGPLOT statement -- it is its own statement. For this example, the legend should automatically appear, unless the legend takes up greater than 20% of the graph area (check your log for a note). If it is dropped due to size, you can adjust that size threshold by using the MAXLEGENDAREA option on the ODS GRAPHICS statement. There is a NOAUTOLEGEND option on the PROC statement that disables this automatic legend. The KEYLEGEND statement can be used to create a custom legend or modify attributes of the automatic legend. See the documentation for examples.
Hope this helps!
Dan