Abort Job when no files found (Extrnal Source Stage)
Posted: Mon Aug 06, 2012 8:00 am
Hi All,
Am reading a file on Extrnal Source Stage using a command below.
Am doing this because I need to remove trailer and Header Records from file before reading.
Issue is - when there are no files to load, instead of ABORT, job is throwing an warning and getting completed successfully.
Can anyone suggest a better way to abort the job when no files found.
Please see the UNIX Command used (in External source Stage) and error warning below.
Am reading a file on Extrnal Source Stage using a command below.
Am doing this because I need to remove trailer and Header Records from file before reading.
Issue is - when there are no files to load, instead of ABORT, job is throwing an warning and getting completed successfully.
Can anyone suggest a better way to abort the job when no files found.
Please see the UNIX Command used (in External source Stage) and error warning below.
Code: Select all
cat #path#/REPO.*.2012-07-11*.txt | sed '1d;$d'
Code: Select all
Warning Message :
Source subproc: cat: PATH/REPO.*.2012-07-11*.txt: No such file or directory