Hi,
I am trying to create a job for auditing Datastage. One of the requirements is to get the total number of records transferred in a certain link.
I reviewed many posts regarding this issue but could not find any answer except references to the EtlStats. I do not need the whole EtlStats and it is require many modifications in order to implement it for my use.
I am trying to create a server routine to get the total rows per link using the DSGetLinkInfo function with the DSJ.LINKROWCOUNT parameter.
This function takes also the JobName and EndStageName as parameters.
DataStage has a function to return EndStage for a link:
DSGetLinkInfo(JobHandle,StageName,LinkName,DSJ.LINKSTAGE)
This routine will not be part of all my jobs. I will user it only for this specific audit job so I cannot use the DSJ.ME option.
In order to use the DSJ.LINKSTAGE function I must get the first stage of a link. Thus I found myself in dead end. I need the first stage name in order to get the end stage name of a link for the total row number.
My question is how can I get the first StageName of a link?
Thanks in advance for your help
DS Audit- number of rows per link
Moderators: chulett, rschirm, roy
You don't need an "EndStageName" but rather a stage name and for a Server job the stage you should point the function to is an active stage... which pretty much means a Transformer.
How automatic/intelligent are you trying to make this routine? All I would suggest is a generic routine that takes all three arguments (job name, stage name, link name) which then sets up and calls DSGetLinkInfo with those values with proper error checks. If you include this routine after-job, you can fall back on using DSJ.ME for the job name and hard-coding the values passed to the other two arguments. For a stand-alone application, I'd suggest building a control table with a list of values to consume and then a simple server job to source from the control table/file as a 'post process' and call the routine for each record, routing the results wherever you see fit.
How automatic/intelligent are you trying to make this routine? All I would suggest is a generic routine that takes all three arguments (job name, stage name, link name) which then sets up and calls DSGetLinkInfo with those values with proper error checks. If you include this routine after-job, you can fall back on using DSJ.ME for the job name and hard-coding the values passed to the other two arguments. For a stand-alone application, I'd suggest building a control table with a list of values to consume and then a simple server job to source from the control table/file as a 'post process' and call the routine for each record, routing the results wherever you see fit.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Craig,
Thanks for your reply.
It is going to be stand-alone application. I already have DS job that extracts all the objects from the DS repository (DS_JOBS, DS_JOBOBJECTS). The query brings me only the job name, object name and object type. The data is inserted into a control table. I want the row counts for all the Input and Output objects. So I cannot use the DSJ.ME.
From the above repository tables I do not have the ACTIVE stage of the link so I am trying to use the DSGetLinkInfo to get the ACTIVE stage name that is needed for DSJ.LINKROWCOUNT InfoType.
I got into a loop since I need to use DSJ.LINKSTAGE (of DSGetLinkInfo) which also requires a stage name.
Maybe you are know a way to use the repository tables in order to get the stages of a link.
Thanks
Thanks for your reply.
It is going to be stand-alone application. I already have DS job that extracts all the objects from the DS repository (DS_JOBS, DS_JOBOBJECTS). The query brings me only the job name, object name and object type. The data is inserted into a control table. I want the row counts for all the Input and Output objects. So I cannot use the DSJ.ME.
From the above repository tables I do not have the ACTIVE stage of the link so I am trying to use the DSGetLinkInfo to get the ACTIVE stage name that is needed for DSJ.LINKROWCOUNT InfoType.
I got into a loop since I need to use DSJ.LINKSTAGE (of DSGetLinkInfo) which also requires a stage name.
Maybe you are know a way to use the repository tables in order to get the stages of a link.
Thanks
