Inaccurate Record counts on links

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Inaccurate Record counts on links

Post by deepa_shenoy »

Hi,

How do I get the ACCURATE record counts of links in a job?

I am using the following command

DSGetLinkInfo (handleJob, StgNmTrimed, LinkNmTrimed, DSJ.LINKROWCOUNT) in my basic routine.

I would like to know if the same command can be applied for jobs which are multiinstanced.

This is not working properly. In the first run it shows 9198 records, in the second run it shoes 0 records despite the count being 9198.

When run manually, it shows 9198 records.

When the job is called from a sequence, it shows 0 records.

Thanks in advance.

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

Post by ray.wurlod »

Does invocation from the sequence disable use of the job monitor or disable collection of operational metadata?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Post by deepa_shenoy »

No it does not do that.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

When you attach to the multi-instance job, are you specifying the invocation id and a dot along with the job name?

handleJob = DSAttachJob(JobName.InvID, DSJ.ERRFATAL)
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Post by deepa_shenoy »

Yes we are specifying the invocation id and a dot along with the job name.
Sairam
Participant
Posts: 42
Joined: Tue Nov 11, 2003 1:09 pm

Post by Sairam »

If calling in a independent routine
handleJob = DSAttachJob(JobName, DSJ.ERRFATAL)
InvocationID=DSGetJobInfo (handleJob, DSJ.JOBINVOCATIONID )
CurrentJob = JobName:".":InvocationID
StageName="xxxxx"
LinkName="lnk_xxxxx"
InfoType=DSJ.LINKROWCOUNT
Rec_Cnt = DSGetLinkInfo( CurrentJob , StageName, LinkName, InfoType )
Call DSLogInfo ("Rec_Cnt DS : ":Rec_Cnt , ROUTINE_NAME)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't know how well that function works in a PX job, my direct experience is all in Server where the 'stage' you interrogate is always an active stage, thus typically a Transformer, or things may not go well. Not sure how that all works out in PX, what stage are you pointing it at?
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Post by deepa_shenoy »

It is working fine except when the first stage is a Dataset. It keeps giving incorrect record count.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK... have you reported this to your official support provider?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a bug where modify stages disable the counts. So they all go to 0. Sometimes from that point on in the job. The JobName above needs to be the job_name.instance_name or it will not count what you think it should.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's not a bug, and it can happen with Copy stage also. There's no count because the stage is optimized out of the design. Inspecting the score can verify that this has happened.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

deepa_shenoy wrote:It is working fine except when the first stage is a Dataset. It keeps giving incorrect record count.
What record count do you get when using the dsrecords command with the Data Set?
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