launch the same job with different parameters

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
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

launch the same job with different parameters

Post by kjaouhari »

Hi guys !

Can I launch the same job with different parameters in a job sequence ?
the objective of the job is to check number of rows in tables. I have to check several tables.
My idea is to create a list of all parameters with the tables names and then the sequencer start the first time with table1 then the second time with table2 etc ...

The result is a table like this :
table_name|rows
table1 | 12
table2 | 456

I already have a script can launch a job several times with different parameters but I want to know if it's possible by sequencer.

Thanks and good week end !
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure... just don't run them at the same time unless it is a multi-instance job. Drag the job onto the Sequence job canvas several times, link them together in a serial fashion and then tweak the parameters as needed. Easy Peasy. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
wnogalski
Charter Member
Charter Member
Posts: 54
Joined: Thu Jan 06, 2005 10:49 am
Location: Warsaw

Post by wnogalski »

If it's a fixed list of tables You can hard-code the tablenames in the sequence by setting the job's parameter.
If it should by dynamic (the table list changes) then store the list of tables f.e. in a sequential file and do the table row counts in a loop for each record in the sequential file.
Regards,
Wojciech Nogalski
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

Also bear in mind it might be possible (depending upon your database configuration) to just pull the DBMS metadata in a single query. E.g. in Oracle:

Code: Select all

SELECT
   table_name, num_rows 
FROM
   tabs
WHERE
   table_name IN ('table1', 'table2', etc.);
HTH,
J.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Post Reply