Source and Target row count matching in Datastage job
Moderators: chulett, rschirm, roy
Source and Target row count matching in Datastage job
Hi
I'm trying to find a way to match the row count from source and tsrget within the datastage job. Is it possible? If so, could you please suggest the solution. If not, what would be my options? Do I need to write something outside the datastage job? Please help.
Thanks in advance
Sri
I'm trying to find a way to match the row count from source and tsrget within the datastage job. Is it possible? If so, could you please suggest the solution. If not, what would be my options? Do I need to write something outside the datastage job? Please help.
Thanks in advance
Sri
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
You could create an after-job subroutine that uses DataStage API functions to retrieve the link row counts.
What do you want to do with these counts?
You could create an after-job subroutine that uses DataStage API functions to retrieve the link row counts.
What do you want to do with these 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.
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:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
OK, so you need the DataStage API function DSGetLinkRowCount() and DSSendMail().
You can find examples of the latter under \Routines\Built-In\Utilities in Designer.
You can find examples of the latter under \Routines\Built-In\Utilities in Designer.
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.
Thanks Ray and Craig.
Apart from using API functions in after job subroutine, can we do something within the datastage job itself?
Can we have a job parameter as an output parameter? In other words, can we run some query in 'before job SQL' and assign the result to a job parameter and use that in the later part of datastage job? As per my knowledge, we don't have that option, but just want to know if something came up in 9.1?
Apart from using API functions in after job subroutine, can we do something within the datastage job itself?
Can we have a job parameter as an output parameter? In other words, can we run some query in 'before job SQL' and assign the result to a job parameter and use that in the later part of datastage job? As per my knowledge, we don't have that option, but just want to know if something came up in 9.1?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Perhaps. However, I would strongly discourage any such approach. I'm not a big fan of extra bits you'd have to incorporate into every job, parts that would on failure jeopardize the load / process itself and cause you to repeat the whole dang thing simply to get said metrics or the check run.dsgguy wrote:Apart from using API functions in after job subroutine, can we do something within the datastage job itself?
From what I have seen (and set up) it is much more common to have a more 'generic' process, something that comes along after a successful nightly load and does the check. It can be driven by control tables - which jobs need to be checked, what link names to use, etc - or can be more dynamic if as noted earlier a standard set of link names or prefixes have been used that can be checked for and captured when found. The 'after' part is significant in my mind as you are not impacting the load itself and failures in the checking process are much less urgent than if they fail the load as well. And it can be run anytime after process completion before the next iteration of the process.
My two point four cents.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers