Reset the program parser is what is needed, where anything (not only macros) unclosed (including quoted macro text, brackets, quotes, statements, macros, etc) is closed and the program parser is reset and ready.

then that doesn't work. It is automatically run in EG, but many times I can execute a blank program and it will generate an error every other time. SAS does not seem to have a working solution for this problem. It would be nice if the solution existed.