Row Counts and UserVariable activity

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
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Row Counts and UserVariable activity

Post by JPalatianos »

Hi,
In the server world I would always store values in a hash file and look them up in the UserVariable stage. I now have parallel jobs where I am retrieving row counts (into a sequential file for now). How can I get those counts into the UserVariable activity stage in my sequence?
Basically I am looking to terminate processing if any onbe of many row counts iz zero.

Thanks - - John
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

I think the best way is to read the sequential file in a server routine to parse the file and returns a flag to continue or abort the sequence and call it from user variable activity.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
sajidkp
Participant
Posts: 114
Joined: Thu Apr 30, 2009 12:17 am
Location: New Delhi

Post by sajidkp »

But you cannot use a server routine in a parellel job .....

The other way is try to read the file from a command task in the sequencer ( use cat command) then pass it to the job or wherever you want
Regards,
Sajid KP
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In Windows, that would be 'type' rather than 'cat' unless you have MKS installed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

sajidkp wrote:But you cannot use a server routine in a parellel job .....
Its a sequence not a parallel job. In sequence you can use it without any problem.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Add an execute command stage in sequencer and use its result in user variables.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thanks everyone!! I ended up going with teh TYPE command and reading an indicator. Works fine!!
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

I have tools that allow you to store and retrieve values from a parameter table, and access them from within a sequence. They may help. Look at the DataStage Tools page on www.anotheritco.com .
Post Reply