populating job statistics in an audit table

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
ayan
Participant
Posts: 64
Joined: Fri Oct 23, 2009 4:09 am

populating job statistics in an audit table

Post by ayan »

Dear All,

I have a requirement where there is a sequence with 5 jobs and the sequence is executed from a shell script. I would like to have the execution statistics of each job in an audit table with structure(load_id,status,recordcount_read,recordcount_loaded,load_date).Need help on how can I capture the read and loaded record counts of a job.Is it possible to do it from a shell script after the job has finished?I have seen a few DS functions but though we can certainly capture start and end time from them,not sure whether input and output record counts can be found out.Need some help.

Regards,
Ayan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There are a ton of discussions here on that subject, so be prepared to search and dig. One decent starting point would be here:

viewtopic.php?t=130037
-craig

"You can never have too many knives" -- Logan Nine Fingers
ayan
Participant
Posts: 64
Joined: Fri Oct 23, 2009 4:09 am

Post by ayan »

Thanks for your reply.I understand that job stats could be found out from a shell script using various dsjob switches (logsum ,logdetail,lownewest ) . However after consulting server job developer guide,I don't find out any of them giving out no. of records read and records loaded.Though certainly jobname,status,start and endtime can be captured.I have been using informatica for sometime but very new to datastage.Could you kindly provide some specific guidance?Yes,I searched the forum and found some very useful posts but still could not get this record count capturing code right.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Process is easier for Server jobs, luckily. You can get the information from the 'Finishing' records in the log or by checking specific links in the jobs using DSGetLinkInfo with the DSJ.LINKROWCOUNT info type. From the command line, you could parse it from the dsjob -linkinfo output.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ayan
Participant
Posts: 64
Joined: Fri Oct 23, 2009 4:09 am

Post by ayan »

ok.got the idea.will try that out.Thanks.I am very new to this forum but must say,a very dynamic forum with lot of useful info.Very useful for beginners like me.
Ayan
anil.kr06
Participant
Posts: 9
Joined: Sun Dec 30, 2007 3:10 am

Want to capture job end timestamp

Post by anil.kr06 »

ayan wrote:ok.got the idea.will try that out.Thanks.I am very new to this forum but must say,a very dynamic forum with lot of useful info.Very useful for beginners like me.
Hi,

How job end time can be captured in datastage.

Anil
anil.kr06
Participant
Posts: 9
Joined: Sun Dec 30, 2007 3:10 am

Want to capture job end timestamp

Post by anil.kr06 »

ayan wrote:ok.got the idea.will try that out.Thanks.I am very new to this forum but must say,a very dynamic forum with lot of useful info.Very useful for beginners like me.
Hi,

How job end time can be captured in datastage.

Anil
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

DSGetJobInfo(hJob, DSJ.JOBENDTIMESTAMP)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anil.kr06
Participant
Posts: 9
Joined: Sun Dec 30, 2007 3:10 am

How to capture job end time

Post by anil.kr06 »

ray.wurlod wrote:

Code: Select all

DSGetJobInfo(hJob, DSJ.JOBENDTIMESTAMP)
...
Hi Ray,
Thanks a lot for your reply. I am quite new to datastage, could you please bit clear where to write this code to capture job end time.

Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Those functions would need to be coded into a custom routine (or a job's "Job Control" tab) in BASIC. Note you can also get this from the command line using dsjob from the last log entry.
-craig

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