COMMON Variables

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Juan.Guerrero
Participant
Posts: 1
Joined: Thu Oct 07, 2004 1:44 pm

COMMON Variables

Post by Juan.Guerrero »

Hi Everyone!

I have a problem trying to define a common variable for use in diferents transformations in the same job. In another post, Ray Wurlod say that a common variable preserve the value while in a transformation only; but if we want to use it in more than one transformation we must define and initialize the variable in Job Control.

This work fine in DS 5.x and DS 6.x, but it's not working in DS 7.01, any suggestions? comments? upgrades?

TIA
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

A common is valid across one connection to Universe. Where they break connections or really create a new connection within one job is up to Ascential and has changed several times between versions. I would use a hash file or a sequential file to read and write these values. You could do this only in loading the initial value. You could then use a common then you may be consistent across versions.
Mamu Kim
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A variable defined in COMMON is only available in one process.

In version 5.x and 6.x, two Transformer stages joined by a link would run in a single process (DSD.StageRun), that invoked the subroutine for each in turn.

My guess is that you have enabled row buffering in your 7.x version of the job, which is allowing the Transformer jobs to run in two processes.

If this is the case, you've broken the rule. You would need to disable row buffering for this job, even through your project-wide default is to have row buffering enabled.

It's also possible- though I have not investigated it fully - that Ascential has changed the way that active-to-active links work in version 7.x, and they no longer execute in the same process. This may be why Ascential has been putting out messages advocating weaning your designs off the use of COMMON variables (as well as the fact that they're not readily able to be migrated to PX jobs).

Needless to say, many of the SDK routines - that have been around for ages - require access to COMMON variables; someone will need to review these.
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