Fetch job Stats
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Tue Jan 18, 2005 5:48 am
Fetch job Stats
Hii,
I need to fetch the job Start time,Job Termination Time and Number of times job ran into a db2 Table.
Can anyone tell me how to do that ??
Thanks
I need to fetch the job Start time,Job Termination Time and Number of times job ran into a db2 Table.
Can anyone tell me how to do that ??
Thanks
regards,
Jayant S Thakore
Jayant S Thakore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 42
- Joined: Tue Jan 18, 2005 5:48 am
Kim has mentioned one way. You can get that from his signature link.
There are some other option from DSGetJobInfo funciton in datstage.
DSJ.JOBELAPSED
DSJ.JOBLASTTIMESTAMP
DSJ.JOBSTARTTIMESTAMP
You can also leverage the
dsjob -log
-logsum
-logdetail options for it.
There are some other option from DSGetJobInfo funciton in datstage.
DSJ.JOBELAPSED
DSJ.JOBLASTTIMESTAMP
DSJ.JOBSTARTTIMESTAMP
You can also leverage the
dsjob -log
-logsum
-logdetail options for it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Most of what I have in EtlStats is using dsjob -report XML. I can also retrieve old job runs by reading the job log directly. There is no other way to get an old run. The API only deals with the last run. There is a last run for every job instance though. If you autopurge your logs then that option is gone.
Mamu Kim
can you please explain me the syntax of executing the 'dsjob -report' let my project name is abc, my host name is yyy, my userid is user and password is pass... i m new to datastage and do not know much... so it will be a great help if you can help me...kduke wrote:Most of what I have in EtlStats is using dsjob -report XML. I can also retrieve old job runs by reading the job log directly. There is no other way to get an old run. The API only deals with the last run. There is a last run for every job instance though. If you autopurge your logs then that option is gone.
Thx
Sunny
Regards,
Sunny Sharma.
Sunny Sharma.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
You can find the dsjob command documented in the Server Job Developer's Guide or the Parallel Job Advanced Developer's Guide
If you're on the DataStage server machine, you can useIf you want to execute from somewhere else it's
You can find the dsjob command documented in the Server Job Developer's Guide or the Parallel Job Advanced Developer's Guide
If you're on the DataStage server machine, you can use
Code: Select all
dsjob -report projectname jobname
Code: Select all
dsjob -host yyy -user user -password pass -report projectname jobname
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
EtlStats has a job named DSJobReportDb. It is in a folder called EtlStats\ETL_Row_Counts. It has a before job ExecDOS command:
Where in DOS
dsjobcmd="..\..\Engine\bin\dsjob -report"
If you have UNIX then this needs to change to a ExecSH command and
dsjobcmd="../DSEngine/bin/dsjob -report"
So Ray's syntax is the same except XML is added to the end of the dsjob command.
This job is executed by 2 other jobs DSJobReportDbDriverNoWait which executes DSJobReportDbDriver which executes DSJobReportDb. DSJobReportDbDriverNoWait should be the last step in your sequence. You can copy this last step out of SeqPrepareEtlStats. This sequence should setup all the metadata needed to run EtlStats after each sequence and email you the row counts of successful jobs or logs of all failed jobs. You have source code on all jobs and routines in this DSX.
Code: Select all
#dsjobcmd# #projName# #jobName# XML >KimD\#jobName#.xml
dsjobcmd="..\..\Engine\bin\dsjob -report"
If you have UNIX then this needs to change to a ExecSH command and
dsjobcmd="../DSEngine/bin/dsjob -report"
So Ray's syntax is the same except XML is added to the end of the dsjob command.
This job is executed by 2 other jobs DSJobReportDbDriverNoWait which executes DSJobReportDbDriver which executes DSJobReportDb. DSJobReportDbDriverNoWait should be the last step in your sequence. You can copy this last step out of SeqPrepareEtlStats. This sequence should setup all the metadata needed to run EtlStats after each sequence and email you the row counts of successful jobs or logs of all failed jobs. You have source code on all jobs and routines in this DSX.
Mamu Kim