need a message to output

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
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

need a message to output

Post by suryadev »

My job has a lookup between input and DataBase. If I get records from the database lookup is done between input and Database,records are sent to the output . If no records come out from the database A message should be sent to the target saying"no records found".


Is there any stage which could be used between look-up and target which could be used to generate message to the target if no records are returned?
Thanks,
Surya
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

put a transformer in between the lookup and target stage, and if the value from the reference link link is NULL then set the values to "no records found"
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Or enable to reject mode in the lookup -> column generator with your message -> funnel back with mail stream
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

when I use a transformer after look-up I get 18 fields as output from look up.....do i need to create an other column in transformer target for the message or any condition over there?
Thanks,
Surya
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Re: need a message to output

Post by anbu »

A message should be sent to the target saying"no records found"
What do you mean by target here? Target database or application ?
You are the creator of your destiny - Swami Vivekananda
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

Actually I have two conditions specified in the query used in ODBC.

If the situation arises in any of these conditions no records can be pulled out of the database.

So when these situations arise I mean if condition1 happens msg should be condition1 so no records

if condition2 is the situation then msg should be condition2 so no records.

The target is WISD output.
Thanks,
Surya
Post Reply