Table count to a Parameter

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
mspanda
Participant
Posts: 32
Joined: Tue May 09, 2006 6:22 am
Location: bangalore

Table count to a Parameter

Post by mspanda »

Hi,

How do I read a Db2 table record count into a job parameter in datastage?

Regards
Prasanna
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

One way is to execute the Db2 select clause from a command stage in a sequence, then pass the result as a parameter to a job. Sequences cannot read tables directly.
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Post by saikir »

Hi,

An other possible way would be to read the records from the DB2 table, pass the output a transformer stage variable and call the job with the stage variable parameter
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Write your count in one job to a sequetial file. Read the sequential file in a routine. Feed the parameter from an argument in the routine.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or, to extend Kim's suggestion, use the job's user status area. There's no point using a parallel job to process just one row, and it's much easier to use a server job's user status area. The contents of the user status area are available downstream in the job sequence as an Activity variable called $UserStatus.
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