Search code examples
datastage

Capturing Reject Records in a File in DataStage


I am trying to create a DataStage job where I want to capture the rejected records in a file. The problem I am facing here is that - when there are no reject records, the reject file still gets created. It is working fine when I have rejected records as that time it properly captures the rejected records.

Is there any option in DataStage 11.5 Sequential File Stage to not create the empty file if there are no reject records?

Thanks!!!


Solution

  • There is no such option. What you can do is create an after-job subroutine to delete the file if no records have been sent to it. This can execute an operating system command if you prefer.