The submit
statement is a feature of the SAS/IML
language, so it must be submitted during a SAS/IML code block.
proc iml;
submit / R;
x <- 5
x
endsubmit;
quit;
Further, you must have the RLANG system option set (which may be controlled by you or your administrator) at system startup.
For more information see the SAS documentation.
In addition, you need to have SAS/IML version 9.22 to use R. This comes with some installations of SAS 9.2 TS3M2, but having that release is not a guarantee of having the functionality available. Per this question on SAS Communities, Rick Wicklin suggests testing with this code:
proc iml;
c = cuprod(1:5);
If that does not work, then you do not have SAS/IML 9.22 and thus cannot use submit to R.