Automation run time column propagation

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
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Automation run time column propagation

Post by devsonali »

Hello All ,
I have x number of tables that I am currently loading via RCP . Since this is a direct load , I have to manually give source and target table (identical tables) names as parameters and run the job.
I was wondering if there is a way to automate this by say making the job read the table names from a file (or any other way to make this process automated).

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

Post by chulett »

Sure... you should be able to pretty easily script something to pull the names from a file and loop through the list, launching the job via dsjob each time. Or build a Sequence job with the Start / End Loop stages to do the same thing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Post by devsonali »

When I loop the sequencer,I will loop it x times but how can I change the table name (which is a parameter) on the fly to take one value (table name) at a time ?

So basically How do I say for loop 1 - Take the parameter as Table X , For loop 2 read the Table name as Table Y so on .
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Post by devsonali »

So basically do we still need a script when we choose to do it via sequencer job ?

There is one job that asks for source and target table name (parameters) for each run , when we do it manually.

When I call this job via sequencer and loop it - Do I still need a script to read the list of table names ? I hope my question here makes sense.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Somehow you need a list of table names. You may be able to read it using a simple command (rather than a script). Maybe you can even hard-code it in the StartLoop activity. Use a "list of things" loop in the StartLoop activity to step through your list.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Post by devsonali »

--Sorry getting back to this one after some time now

Ray
I did test this . I took one job which calls a table (via parameter called table name).

My design starts the loop with list option (comma delimited) and I gave two table names here in the list. This connects to a job activty stage where the parameter for table holds the value of the counter . One link from job activity stage is an e mail link that sends an e mail (for testing purpose) with subject as the counter and then other link goes o end loop stage .

When I run the job I see the job log just runs once with the first value of specified table name . Though I get two e mails with two table names the job log does not show two runs with two different values for Table name parameter. What am I missing here ?
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Post by devsonali »

This is now resolved using list option as Ray indicated above within the loop. Thanks Craig and Ray
Post Reply