Sending Mail

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
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Sending Mail

Post by poornima.chandramouli »

I'm creating a reject file in a job,If there are any records present in the reject file,i should send a mail to a appropriate DL.

Current Approach:

I was populating a new coumn with default value as '1' & populating the aggregation of the particular default column in another file & then read the count file,then check for it's value if it's value is greater than 0 then i'll mailing the rejected file to the DL,if my reject file doesn't have any reords i should send a mail as 'NO Records Rejected' to another DL.

But I got a new problem here,like if nothing was rejected i.e., if my reject file doesn't have any record,my aggregation is not working,becoz there won't be any reords flowing into my aggregator,So it doesn't output any records.

How to achieve it.
Regards
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

To keep the same working mechanism, in your count agg job, add a row generator with a zero value in the column and funnel together.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Another thought, dump the file/aggregator approach and use DSGetLinkInfo() after the job completes to see how many rows were written to the reject file. Email based on that count.
-craig

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