Added on 19 September 2017 by the author of below post:
Below solution actually doesn't work because DIS will generate the length definition for _infilename AFTER variable _infilename has been used in filename=_infilename. Because of this sequence _infilename will actually get assigned a default and too short length. The SAS log will show the following Warning
WARNING: Length of character variable _infilename has already been set.
Use the LENGTH statement as the very first statement in the DATA STEP to declare the length of a character variable.
Refer to https://communities.sas.com/t5/SAS-Data-Management/Adding-Multiple-Filenames-to-DI-Studio-Job/m-p/397083#M12052 for solution options.
@suttipop
It's always worth to look into the generated code to understand why things are not working - and to get ideas what you could try to make it work.
As @LinusH was hinting there is a "hack" option to make this work.
Once you've done such a set-up look into the generated code to understand how this affected code generation.
... View more