Are you coding for full job security? BQUOTE will quote an unmatched un-escaped single quote. I usually macro variables in %PUT. %macrotestit (outputlocation, outputname); %letoutfile =&outputlocation/&outputname; %put& outfile; %mend; %let_ metauser=sasuser; %letoname =% str(&)_ metauser.%str(&) SYSDATE._Test% str(%') s; %letoname =% nrbquote(%unquote(& oname)); %put This is how values are passed into the stored process: % superQ( oname); %letoloc=c:\mysas; %testit(&oloc, &oname); I would change the date format to YYYYMMDD so the filenames will sort in a more pleasing order. %let oname=%str(&)_metauser.%sysfunc(today(),yymmddn8.)_Test%str(%')s;
... View more