Creation on a sequential file based on a condition

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sathyanveshi
Participant
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Creation on a sequential file based on a condition

Post by sathyanveshi »

Hi,

I need to create a sequential file based on a condition. I'll be running a SQL query in one of the jobs. I want this job to call another job only when the count of rows retrieved by the SQL query is zero (0).

How can I design my sequence?

Cheers,
Mohan
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Hi

your question is not clear.. please explain what you want..


Thanks
Man
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The problem is, what becomes of the result of the SQL query in the first job? Presumably this is being written to a sequential file.

Your Job Sequence, therefore, should run the first job then introduce some way to determine whether the file has zero length or not (use a Command Activity with the test -s command is probably easiest, or use a Routine Activity and write your own routine to test for the same thing). Based on this result you can trigger or not trigger a second Job Activity to run your second job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply