@Madtim
I'm very much with @RW9 to take an approach where you first populate a SAS variable with the full command then then just use a call execute(<variable>);
Taking such an approach lets you "put" the variable into the log and you can see the full generated command and syntax check it. You can even copy/past it from the log to another program window and execute it. This makes debugging much easier - at least for me.
... View more