You reasoning for using the CALL EXECUTE is to have you macro compile locally and transfer the generated SAS code/text to the remote server for execution. I understand why you feel this should be treated as a bug, but, I also feel that your approach is mostly what is flawed. As Linus said, the appropriate place to report bugs is with SAS Tech Support. In your specific example, rewriting the FOO macro to something like the following resolves all your issues: %macro foo; data _null_; foo = cat('x', repeat(' ', &k.), 'x'); len = length(foo); put len=; run; %mend; My recommendation would be to transfer the macro (even when compile in work on the client session) to the remote session and have it execute there. %let k=1000; %macro foo(session, k); data _null_; len = length("x%sysfunc(repeat(%bquote( ),&k.))x"); put ">>>&session. " len=; run; %mend; /* transfer macro FOO to remote, for non-shared file systems using PROC UPLOAD could be used instead of inheritlib option, this is example for MP-CONNECT style rsubmit */ options dlcreatedir; libname tmp "%sysfunc(pathname(work,l))/mstore"; proc catalog c=work.sasmacr et=macro; copy out=tmp.sasmacr; select foo; run; options noquotelenmax; %foo(local, &k.) signon t sascmd='!sascmd' inheritlib=(tmp); %syslput k=&k.; rsubmit t; options noquotelenmax; options mstored sasmstore=tmp; %foo(remote, &k.); endrsubmit; signoff t; data _null_; call execute('signon t sascmd="!sascmd" inheritlib=(tmp);'); call execute('%nrstr(%syslput k=&k.;)'); call execute('rsubmit t;'); call execute('options noquotelenmax;'); call execute('options mstored sasmstore=tmp;'); call execute('%nrstr(%foo(remote, &k.);)'); call execute('endrsubmit;'); call execute('signoff t;'); run;
... View more