Send RowCount as Email

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
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Send RowCount as Email

Post by karthi_gana »

All,


My Job design :

Code: Select all


FeedFile   ------------         -----> New_Symbols_Identified
(Seq File)         |              |        (seq file)
                       |              |
                       v             |
                     Transformer
                     ^      |
                     |       | 
                     |       | 
Symbols-------------        ------------- Existing Symbols(seq file)
I would like to attach the below details in the email body to send it to the support/user team.

No of Rows Received = 5000 (example)
No of Rows Processed = 4990 (example)
No of Rows Rejected = 10 (example)
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you can get the information you want to send into a file then you can send it out in an email as an attachment but there's nothing "out of the box" to get any kind of variable text into the body of an email. To do that, you would have to write your own emailing routine, one that either called your email program of choice directly and built the body dynamically or leveraged the built in DSSendMail() function. You could even script something where you write out the file and then script a call to sendmail (or whatever) and incorporate the contents of the file into the body.

In other words, many ways to solve this but all require some 'special' coding on your part.
-craig

"You can never have too many knives" -- Logan Nine Fingers
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

You are the creator of your destiny - Swami Vivekananda
arunpramanik
Participant
Posts: 63
Joined: Fri Jun 22, 2007 7:27 am
Location: Kolkata

Post by arunpramanik »

Play with the below function -

Code: Select all

DSGetLinkInfo(JobHandle,StageName,LinkName,DSJ.LINKROWCOUNT)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't know about anyone else, but I answered the way that I did because the question was how to "send rowcount as email" specifically sending them in the email body - not how to get the counts to send.
-craig

"You can never have too many knives" -- Logan Nine Fingers
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

The notification activity does not allow parameters for the body of the email, but you can used the DSSendMail utility routine for this purpose

This is a built-in routine that comes out of the box. Look under "Routine" in the project's repository windows
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
Post Reply