Count issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

Count issue

Post by hargun »

Hi,

I have probelm reagrding getting Target count using routine which i am using in sequence.The rotuine is as follows

$INCLUDE DSINCLUDE JOBCONTROL.H

valid = @FALSE
Hjob1=DSAttachJob(JobName,DSJ.ERRFATAL)

Status=DSGetJobInfo(Hjob1,DSJ.JOBSTATUS)
Call DSLogInfo("Status of the job is ":Status,"Routine")

count1=DSGetLinkInfo (Hjob1, SStage, SLink,DSJ.LINKROWCOUNT)
Call DSLogInfo("Source Count is ":count1,"Routine")

count2=DSGetLinkInfo (Hjob1, TStage, TLink,DSJ.LINKROWCOUNT)
Call DSLogInfo("target Count is ":count2,"Routine")

count3=DSGetLinkInfo (Hjob1, UStage, ULink,DSJ.LINKROWCOUNT)
Call DSLogInfo("Source Count is ":count3,"Routine")

count4=DSGetLinkInfo (Hjob1, DStage, DLink,DSJ.LINKROWCOUNT)
Call DSLogInfo("target Count is ":count4,"Routine")

Count = count1 : '|' : count2 : '|' : count3: '|' : count4
Call DSLogInfo("Total Counts After Concatination ":Count ,"Routine")

Ans=Count
This i am using in sequence to get source and target count.

My job design is


db2
.

DB2............................look up .........copy....................dataset

when i use this job in sequence couldn't be able to get target count but after changing the dataset with sequential file and then use job in sequnece,and run it then i am able to see the target count using that routine.

I don't know why its working for sequential file/other stages not for dataset.I had tested that routine and showing the target count but in job i didn't get.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what we've seen here over the years it is a known "issue" with datasets, kind of surprised it is still an issue. I would think it would be worth asking your official support provider about.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Two other possibilities.

Your Copy stage might be being optimized out of the design (so could not deliver a row count). Set its Force property to ensure that it is in the flow.

Instead of the input row count to the Data Set stage you could obtain the output row count from the Copy stage (which is necessarily the same if the job completes successfully).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

DSJ.LINKROWCOUNT not working for Datasets

Post by synsog »

We are also facing the same issue where by when we do want to capture the record count for datasets using DSJ.LINKROWCOUNT , it yields 0 where as if the stage has been replaced with some other stage the record count gets captured.

Initially , the dataset stage itself was not getting captured since we were using DSJ.STAGELIST however later on we used DSJ.FULLSTAGELIST as a result of which at least the stage was getting captured and the corresponding link name for the same. However despite all this , we cannot still capture the record counts for the dataset.

Is there a solution for this bug ?? do we need to raise a PMR or something for this ??? .. As per Ray's comments we can have another stage prior to the dataset say the copy stage and manage to capture the record count. However this would just be a work around and perhaps we will have to unnecessarily plant a stage before the dataset just to capture the record count. .

Just want to know whether a fix for this has taken place or not.. Many thanks in advance for your valuable replies :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As you noted, that would be a question for IBM.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply