Question about DSGetLinkInfo routine

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
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Question about DSGetLinkInfo routine

Post by dfkettle »

Can someone tell me if the DataStage routine 'DSGetLinkInfo' is supposed to work when called from a parallel job? Or does it only work when called from a server job? The reason I asked is because it's described in the Server Job Developer's Guide, but not in the Parallel Job Developer's Guide.

Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's a BASIC function so you either need a Server job or a custom Before/After routine to call it, that or a Server Shared Container. That being said, you should be able to use it on a Parallel job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Post by dfkettle »

Thanks. Someone here had a parallel job that was calling it from an After Job routine, and it didn't always work as expected (although it ran). I'll ask him to change it to a server job and see if that fixes it.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The BeforeJob and AfterJob calls are executed as BASIC calls in the server engine. There is no reason to re-write the parallel job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, mentioned those as viable avenues. What about it didn't work as expected?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Post by dfkettle »

Sometimes it doesn't return the correct row count.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you narrow down the 'sometimes'? What stage are you trying to get counts from?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Post by dfkettle »

chulett wrote:Can you narrow down the 'sometimes'? What stage are you trying to get counts from? ...
That's what we're trying to figure out. It happens infrequently, and we haven't been able to find any pattern yet that might help us understand the problem. It's retrieving the number of rows extracted by a DB2 stage in the same job.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

How long after the job finishes is the DSGetLinkInfo() called? Sometimes things work a bit asynchronously. Also, what partitioning is used for that job and link - anything special or different?
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Post by dfkettle »

It's in the same job (it's wrapped up in an "after-job" subroutine, called with 'DSJ.ME'). It always runs with the same number of partitions (two). The only thing different about the failed run was that we had DS_PXDEBUG turned on (for other reasons). Maybe that was just a coincidence, though.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Do you find it mainly plays up when your InfoSphere server is getting worked hard?

I've had the situation where with not all of the individual node rowcounts make it back in time for the DSGetLinkInfo() call, resulting in discrepancies.
In our case, DataStage was set up for 8 nodes, the batch ran 8 simultaneous jobs, and it only happened with large, complex jobs.

Putting a short delay before the DSGetLinkInfo() call reduced the rate of occurrence greatly, but never quite eliminated it.
dfkettle
Participant
Posts: 27
Joined: Tue Jun 13, 2006 6:56 am

Post by dfkettle »

Thanks, you may be right. Like I said, it happened when we had debugging (DS_PXDEBUG) turned on. Maybe DataStage was busy.
Post Reply