Page 1 of 1

How do I fail job if FTP returns zero records?

Posted: Mon Jan 17, 2011 11:46 am
by timlind53
How do I fail a DataStage Server job if my FTP stage returns zero records? I'm looking for a way to do this within DataStage Designer without having to do JCL code in a batch step.

I assume this can be done with a constraint of some kind in the following downstream Transform stage but I'm not sure how to do it.

I don't code DataStage jobs everyday so be clear with any answer.

Thanks in advance.

Posted: Mon Jan 17, 2011 2:54 pm
by chulett
Zero records = nothing for the transformer to check. Do it 'after job' with a custom routine that uses DSGetLinkInfo to see how many rows were processed.

Posted: Tue Jan 18, 2011 11:10 am
by timlind53
chulett wrote:Zero records = nothing for the transformer to check. Do it 'after job' with a custom routine that uses DSGetLinkInfo to see how many rows were processed.
It sounds like this cannot be done within a server job itself. Only through code in a batch job. Is that correct?

Posted: Tue Jan 18, 2011 12:20 pm
by chulett
Depends on your terminology, I guess. The routine to check and abort the job would still be part of the Server job, a part that runs 'after job' i.e. after everything on the canvas finishes. No 'batch' job or separate process needed, but yes some 'code' will be involved.