filename dirlist pipe 'ls "/data/set1/&year." /s';
here &year. is not resolving.
any papers on this pipe?
Use double quotes on the outside to allow macro variable references.
set one ;
filename dirlist pipe "ls -R ""/data/set1/&year"" " ;
Try this with single quotes around the file path:-
filename dirlist pipe '/data/set1/&year.';