help on Ds log files

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
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

help on Ds log files

Post by paddu »

Hi all

i searched the forum but need more help.

how do i capture source and target row counts from DS Director log files into a file or a table ???
please pass some suggestions.



Thanks
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

You would need to write your own program for parsing the log file (if you want to do it outside ds).
But doning it that way is time consuming and may not be accurate at times.

You can use the DSGetLinkInfo function which can be used from within the job or outside the job (may be a separate routine) to get the row counts on a link within the job.
Success consists of getting up just one more time than you fall.
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

i used DSGetLinkInfo function in the job .
result of the count is 0 on the link which actually has 30 record count
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

At what place you are using it ?(very important)

You should be using it within a routine which can be called through after job subroutine. This will make sure that your job has finished and the counts on the link are the final.
Success consists of getting up just one more time than you fall.
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

i used in the transformer , trying to capture counts from source link .

Can you help me building in Routine?

Appreciate your help

Thanks
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

i used the function as

DSGetlinkInfo(DSJ.ME,"Source","out",DSJ.LINKROWCOUNT)

in the transformer.


thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The job needs to finish as already pointed out to you. Using the function inside the transformer will not get you the required output as the job is still in execution mode.
If you want to use it in the transformer itself then specify another link with two column with exactly the same constraint as the link you want the row count of. Put @OUTROWNUM as a derivation for one column and default the other column(dummy key) to some value say '1'. Pass it through the aggregator, group by the dummy key and specify Last as the derivation of the other column. That will get you the rowcount.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

HI all,

thanks ,i got the idea DSguru2b .
My situation is all the jobs ( 50)are designed .if i use the function in the Transformer and pass that to aggregate and so on, my each job should have this logic. i need to change all the jobs.

we already are hitting on performance so can you guys help me come up with a routine(share a routine) as "loveojha2" suggested to use as After job Routine.



Any help appreciated

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

Post by ray.wurlod »

Do you have a consistent naming convention for the input link to the target stage and for the output link from the source stage? And for the stages themselves? And for the intermediate active stage (which you will need for DSGetLinkInfo)?

If not, some complexity will be introduced, and you may be better off using DSGetLogEntry to read the "active stage finishing" message to get the row counts.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply