Hello,
Through my investigation I found that this behaviour is addressed within the "Functions That Submit SAS Code" sub-section of the PROC LUA Concepts documentation. In this it states:
When you submit SAS code, do not include these keywords within SAS comments:
run; %macro
quit; %mend
The presence of these keywords within comments in a SAS code block might trigger warnings or errors in the SAS log and might cause unexpected results. To avoid this situation, modify the keywords by placing blank spaces or escape characters within them. For example, run ; or \%\macro within a comment would not trigger unexpected behavior.
The return value from SAS.SUBMIT is assigned to the value of the SYSERR automatic macro variable.
So it seems that when assigned to the back-end processing macros, such statements cause the execution of the code to deviate.
... View more