Any time you have questions about code results best practice is to include, from the LOG, the entire procedure code along with ALL messages, notes, warnings or errors. Copy the text then on the forum open a text box using the </> icon that appears above the main message window and paste the text.
Syntax errors often come from not properly ending previous statements, which is why the entire procedure code should be shown. The text box is important to preserve formatting of the messages as SAS often supplies diagnostic information but the software in this forum will reformat text pasted into the main message window rendering the diagnostics less useful.