Hi All,
I have a datastage job (parallel edition) that counts the numbers of records processed and writes to a text file (or it can write to a peek stage)
After the job completes successfully, I have to send an email to the team with total number of records processed. There is Notification_activity under sequence. how do I read the total number of records processed in a datastage sequence from a parallel job?
Thanks
Mark
Total Record Count
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 8
- Joined: Mon Jun 13, 2011 2:55 am
- Location: india
Re: Total Record Count
You can build a simple Transform Routine to see how many records have gone through a particular link. Get this count into the sequence
Regards
Sivanandha
Sivanandha
-
- Premium Member
- Posts: 263
- Joined: Fri Sep 23, 2005 6:49 am
Total Record Count
Thank You. I have couple of questions;
There is a environmental parameter @INROWNUM gives me number of records processed however, how can I capture count in a transform routine? and How can pass this count to a sequence?
Thanks
Mark
There is a environmental parameter @INROWNUM gives me number of records processed however, how can I capture count in a transform routine? and How can pass this count to a sequence?
Thanks
Mark
-
- Premium Member
- Posts: 263
- Joined: Fri Sep 23, 2005 6:49 am
Total Record Count
sequence ---Job1 ---Job2
The sequence contains 2 datastage jobs. I have to fnd the total count in the job1 and send an email notification.
Thanks
Mark
The sequence contains 2 datastage jobs. I have to fnd the total count in the job1 and send an email notification.
Thanks
Mark
-
- Participant
- Posts: 8
- Joined: Mon Jun 13, 2011 2:55 am
- Location: india
Re: Total Record Count
FUNCTION myGetRowCount(JobName,StageName,LinkName)
$INCLUDE DSINCLUDE JOBCONTROL.H
hJob = DSAttachJob(JobName, DSJ.ERRFATAL)
RowCount = DSGetLinkInfo(hJob, StageName, LinkName, DSJ.LINKROWCOUNT)
ErrCode = DSDetachJob(hJob)
Ans = RowCount
$INCLUDE DSINCLUDE JOBCONTROL.H
hJob = DSAttachJob(JobName, DSJ.ERRFATAL)
RowCount = DSGetLinkInfo(hJob, StageName, LinkName, DSJ.LINKROWCOUNT)
ErrCode = DSDetachJob(hJob)
Ans = RowCount
Regards
Sivanandha
Sivanandha
-
- Premium Member
- Posts: 263
- Joined: Fri Sep 23, 2005 6:49 am
Total Record Count
Thanks. I was able to find the record count in the job1. How Do I send the total record count in an email to the team from the sequence?
Thanks
Mark
Thanks
Mark
-
- Premium Member
- Posts: 263
- Joined: Fri Sep 23, 2005 6:49 am
Total Record Count
I use this to get the total record count and from a shell script I send an email to the team.
Count=`dsjob -linkinfo $Project $Job $Stage $Link | grep 'Link Row Count' | awk '{print $5}'`
mail -s team.com
Thanks
Mark
Count=`dsjob -linkinfo $Project $Job $Stage $Link | grep 'Link Row Count' | awk '{print $5}'`
mail -s team.com
Thanks
Mark