Hi
I am trying to generate a report at the end of a DatatStage job. I have all the values I need. My report should look like :
DAtA QUALITY ANALYSIS FOR $ TABLE
No of rows extracted from Source - $ ROWCOUNT
N o of rows extracted from Targett -$ ROWCOUNTTGT
No of rows that do not match - $MISMATCH
KEY Columns | SOURCE COLUMNS | TARGET COLUMNS
Is there any way I could do this. WIth the Sequential file I get the second part which is tabular . How can I get the header and the first 3 lines. The report HAS to be in the above format. So if anyone has any suggestions please let me know.
Genrating a report ( not job log ) in a specifc format.
Moderators: chulett, rschirm, roy
Yes you can, why not.
If you are fit in UNIX shell scripting you can ask with dsjob any job about his statistics and then put it in a file sequential file the way you like.
If you are fit in Universe Basic you can write a general Job which does the same, even load this information with a second following job in a table.
Wolfgang
If you are fit in UNIX shell scripting you can ask with dsjob any job about his statistics and then put it in a file sequential file the way you like.
If you are fit in Universe Basic you can write a general Job which does the same, even load this information with a second following job in a table.
Wolfgang
Hi,
you'll probably need to write some basic code to get this info.
perhaps you might consider hiring some one of the consultants here.
anything else was discussed in previous posts.
you should be able to get all the info you mentioned.
look in the help for DSGet... routines
IHTH,
you'll probably need to write some basic code to get this info.
perhaps you might consider hiring some one of the consultants here.
anything else was discussed in previous posts.
you should be able to get all the info you mentioned.
look in the help for DSGet... routines
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Re: Genrating a report ( not job log ) in a specifc format.
Mprashant,
at the end of the job call up an after-job routine, in order to write your data and format to a file in the form
at the end of the job call up an after-job routine, in order to write your data and format to a file in the form
write code similar to (but not identical with, as I've got this copyrighted [just kidding]) You need to flesh out the values for StageToCheck and LinkToCheck as well error checking, but this will give you a good idea of what you need to do.mprashant wrote: DAtA QUALITY ANALYSIS FOR $ TABLE
No of rows extracted from Source - $ ROWCOUNT
N o of rows extracted from Targett -$ ROWCOUNTTGT
No of rows that do not match - $MISMATCH
KEY Columns | SOURCE COLUMNS | TARGET COLUMNS
Code: Select all
OPENSEQ '/tmp/thismyheaderoutput.txt' TO SeqFilePtr THEN NULL ELSE NULL
WEOFSEQ SeqFilePtr ;** ensure that you are overwriting if necessary
ROWCOUNTTGT = DSGetLinkInfo(DSJ.ME,StageToCheck,LinkToCheck,DSJ.LINKROWCOUNT)
ROWCOUNT = 1
MISMATCH = 1
WRITESEQ " DAtA QUALITY ANALYSIS FOR $ TABLE" ON SeqFilePtr ELSE CALL DSLogFatal("OH NO, I messed up",'')
WRITESEQ "No of rows extracted from Source - ":ROWCOUNT ON SeqFilePtr ELSE CALL DSLogFatal("OH NO, I messed up",'')
WRITESEQ "N o of rows extracted from Targett -":ROWCOUNTTGT ON SeqFilePtr ELSE CALL DSLogFatal("OH NO, I messed up",'')
WRITESEQ "No of rows that do not match - ":MISMATCH ON SeqFilePtr ELSE CALL DSLogFatal("OH NO, I messed up",'')
CLOSESEQ(SeqFilePtr)
Last edited by ArndW on Thu Mar 10, 2005 10:54 am, edited 1 time in total.
Hey Arnd,
Thanks a lot for your response. The after job routine works, though how do I pass the value for rowcount to the routine.
FOr example I got the value for rowcount from the previous job and passed it on to a job parameter called ROWS in the current job. Now this I want to write to the sequential file. How can i call this job parameter in my routine or pass the value of job parameter ROWS to a variable in my routine?
Thanks a lot for your response. The after job routine works, though how do I pass the value for rowcount to the routine.
FOr example I got the value for rowcount from the previous job and passed it on to a job parameter called ROWS in the current job. Now this I want to write to the sequential file. How can i call this job parameter in my routine or pass the value of job parameter ROWS to a variable in my routine?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Row count can be had from interrogating the job itself, using DSGetStageInfo or DSGetLinkInfo function. It would help if you have a standard naming convention for your stages and links. How you determine "do not match" would have to be a function of your job design logic (unless mismatched rows are processed to a known link name).
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.