Page 1 of 1

Execution of routine not happening

Posted: Mon Nov 27, 2006 5:49 am
by sumesh
I've a job which includes a sequential file stage and a transformer stage.
Is there any way to get the routine in the transformer executed, if zero rows are passed from the sequential file stage. I've to write the return value from the routine to a target table.

Thanks in advance
Sumesh

Posted: Mon Nov 27, 2006 7:11 am
by loveojha2
No, don't think it is possible from within the transformer, if the transformer is just following the Sequential file stage. Introduce one more stage in between (may be an IPC) (and try DSGetLinkInfo to get the processed row counts and call the routine to get the value to be written to the target table) and place it to the target table link only if the rows processed count is zero for the sequential file stage.

Posted: Mon Nov 27, 2006 7:27 am
by sumesh.abraham
What does IPC mean?. Can u be more specific?

Posted: Mon Nov 27, 2006 8:16 am
by StageZilla
InterProcess Communication??

Posted: Mon Nov 27, 2006 8:23 am
by DSguru2B
You can run an after-stage subroutine in which you can check the rowcount or number of rows present in the sequential file and then pass the return value. Makes sense ???

Posted: Mon Nov 27, 2006 8:40 am
by chulett
Yes, but the question is - will it fire if the job processes zero rows? I don't believe so. :?

However, the answer is a definitely 'yes' if you make it an after job routine.

Posted: Mon Nov 27, 2006 8:45 am
by DSguru2B
It will Craig. Just tested it out. After stage routine will fire regardless of the row count.

Posted: Mon Nov 27, 2006 8:50 am
by chulett
Good to know... I'm not anywhere that I can actually test anything.