Page 1 of 1

Creation on a sequential file based on a condition

Posted: Wed Dec 22, 2004 8:18 am
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

Posted: Wed Dec 22, 2004 11:17 pm
by mandyli
Hi

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


Thanks
Man

Posted: Thu Dec 23, 2004 12:27 am
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.