How to collect job status
Moderators: chulett, rschirm, roy
How to collect job status
Hi all,
I have a job which is sending data from a file to target.
After the job run I need to maintain a stastics table which should contain the following information.
1-file name
2-job name
3-start date
4-no of records processed
5-no of records rejected
can anybody suggest how to acheive this.
I have a job which is sending data from a file to target.
After the job run I need to maintain a stastics table which should contain the following information.
1-file name
2-job name
3-start date
4-no of records processed
5-no of records rejected
can anybody suggest how to acheive this.
Hi I tried to collect the job stastics using a script.
This is the script which I have used to run the job and collect one stastics no of rows passing through a link.
#! /usr/bin/sh
dshome=`cat /.dshome`;
export dshome
PATH=$PATH:$dshome/lib;
export PATH
. $dshome/dsenv
dsjob -run Phase1 test_job
link = DSGetLinkInfo(test_job, "Transformer_2","DSLink4",DSJ.LINKROWCOUNT)
echo $link
while running the script I am geting the error mentioning invalid command.
can anybody suggest?
This is the script which I have used to run the job and collect one stastics no of rows passing through a link.
#! /usr/bin/sh
dshome=`cat /.dshome`;
export dshome
PATH=$PATH:$dshome/lib;
export PATH
. $dshome/dsenv
dsjob -run Phase1 test_job
link = DSGetLinkInfo(test_job, "Transformer_2","DSLink4",DSJ.LINKROWCOUNT)
echo $link
while running the script I am geting the error mentioning invalid command.
can anybody suggest?
Thats a DataStage API function. It will not work at the OS level. Read about DSGetLinkInfo in DataStage help.sjordery wrote: link = DSGetLinkInfo(test_job, "Transformer_2","DSLink4",DSJ.LINKROWCOUNT)
Search the archives on how to use it in a basic batch job or routine.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It will help, as will the -stageinfo and -linkinfo options. To use these effectively in a script you probably also need the -lstages and -llinks options also.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No. Because I would have to guess, even what scripting language you are using.
Type dsjob alone to get the overall syntax. Then type dsjob with any of the options to get more information, for example dsjob -linkinfo to learn the remainder of the syntax to be used with this particular option.
You need to build a loop based on the output of -lstages to iterate through the stages, then an inner loop based on the output of -llinks to get the values you need from the -linkinfo option. Within the loop you need to parse out the values returned by that option.
It would be so much easier to use ETLstats.
Type dsjob alone to get the overall syntax. Then type dsjob with any of the options to get more information, for example dsjob -linkinfo to learn the remainder of the syntax to be used with this particular option.
You need to build a loop based on the output of -lstages to iterate through the stages, then an inner loop based on the output of -llinks to get the values you need from the -linkinfo option. Within the loop you need to parse out the values returned by that option.
It would be so much easier to use ETLstats.
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.