Hi Tom, thanks for your solution. i got the errror, because i had the system option validvarname set to 'any', instead of 'v7', which is the default. Either setting the Option validvarname to v7 or adding the 'v7' option to the nvalid function works: options validvarname=v7; or %if %sysfunc(nvalid(%sysfunc(compress(&varin,%)),v7)) %then %do;
... View more