Fail a job when file pattern not found
Moderators: chulett, rschirm, roy
Fail a job when file pattern not found
I have a job the that uses file pattern to pick up all the files in a directory that has a specific file pattern.I want the job to fail when there is no file with that pattern but the job just shows a warning that there is no file and does not fail. Please let me know how I can make the job to fail.Thanks in advance
How many Sequential File Stages do you have in your job? Are you trying to read other files with different wild cards or names in the same job? I have seen this happen when there were multiple Sequential file stages within the same job and one of the file was not present in the directory the job was expecting to be.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Thank you for the response...I understand what u are saying but I want to know if this can be handled using some kind of option in sequencial file or in datastage instead of using unix to do that.Please let me knowkumar_s wrote:You can promote that particular warning to Fatal Error message using Message handler.
Or you can pre check the number or rows with the given file mask in unix and not to run the job at all. ...
Thank you for the response I am trying to read files using wild cards. I have only one sequencial file stage in the job .Let me knowkris007 wrote:How many Sequential File Stages do you have in your job? Are you trying to read other files with different wild cards or names in the same job? I have seen this happen when there were multiple Sequential file stages within the same job and one of the file was not present in the directory the job was expecting to be.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: