For older versions of DS (where this functionality wasn't available) I use the following script. It takes a file pattern and echos all lines from all matching files with each line prefixed with the name of the source file:
#! /usr/bin/ksh
#------------------------------------------------
# Usage: getFiles.ksh {FilePattern}
#------------------------------------------------
FilePattern="$1"
if [ "$FilePattern" = "" ]
then echo "Must supply a file pattern"
exit 1
fi
# Iterate over files matching the supplied pattern
while [ "$1" != "" ]
do
# Get the filename
SetName=`echo $1`
# Iterate over each line of the file
cat $1 |
while read Job
do
echo "$SetName $Job"
done # read line (from file)
shift
done # read Filenames
(It might look a little weird in places as I've stripped out some funtionality specific to our installation, but it should still work fine.)
We are also facing similar issue while reading multiple files using file pattern option , but we are unable to find the mentioned patch (96576 for DS EE 7.5.1A ) in IBM web site .Please share the Patch/ fix details for this issue .
Different approach ->
You can use the loop stage to the get the file name ?
1.Use Execute Command Activity to fire a shell command 'ls *.csv' (*.csv is the pattern)
2.Use loop stage with list
3.Use the UserVariable activity to get the file name