Execution of routine not happening

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
sumesh
Participant
Posts: 2
Joined: Fri Aug 25, 2006 7:05 am

Execution of routine not happening

Post 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
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post 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.
Success consists of getting up just one more time than you fall.
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Post by sumesh.abraham »

What does IPC mean?. Can u be more specific?
StageZilla
Participant
Posts: 15
Joined: Tue Nov 21, 2006 3:45 am
Location: WhiteField, Bangalore

Post by StageZilla »

InterProcess Communication??
The quick brown fox jumps over the lazy dog.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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 ???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It will Craig. Just tested it out. After stage routine will fire regardless of the row count.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Good to know... I'm not anywhere that I can actually test anything.
-craig

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