How do I fail job if FTP returns zero records?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
timlind53
Participant
Posts: 7
Joined: Wed May 21, 2003 1:24 pm
Location: USA

How do I fail job if FTP returns zero records?

Post 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.
Tim Lindsey
Boeing Commercial Airplanes
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
timlind53
Participant
Posts: 7
Joined: Wed May 21, 2003 1:24 pm
Location: USA

Post 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?
Tim Lindsey
Boeing Commercial Airplanes
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply