Page 1 of 1

Passing Parameters for Multiple instance DS job

Posted: Wed Apr 06, 2011 7:51 am
by srinivas Guduru
Hi
I need to pass the parameters for Datastage job (multiple instance)

For each instance the following set of parameters I need to pass to DS job
SourceFileName, SchemaFileName, TargetTableName, Invocation ID
File1.txt, File1.schema, Table1 , 1
File2.txt , File2.schema , Table2 , 2

Like this I need to pass the paramerts for 150 (Times) files to DS Job (Multiple Instance.

To pass the parameters should I use unix script, anyone can give me the script logic in detail.
How to read param values from a file and pass them to DS job .
I am new to Data warehouse environment

Thanks
Srini

Posted: Wed Apr 06, 2011 8:45 am
by GJ_Stage
Use dsjob -run command with paramters using unix script calling multiple time. something like below:

calling()
{
dsjob -run <arguments> ....
}

calling File1.txt File1.schema Table1 1
calling File2.txt File2.schema Table2 2

Posted: Wed Apr 06, 2011 11:04 am
by arunkumarmm
Can you give more information like, Do you use a scheduler? You want to run the jobs parallely or one after the other?

Posted: Wed Apr 06, 2011 11:36 am
by FranklinE
We have a similar situation, and the control point for setting the parameters for each instance is a table. It can be set dynamically, in that the number of jobs executed is equal to the number of rows in the parameters table.

reading parameter values from table and passing them to job

Posted: Wed Apr 06, 2011 3:00 pm
by srinivas Guduru
Actually I need to read the parmeter values from a table and pass them to datastge job(Multiple instance).

If you have unix script to read params from table and passing the params ds job(multiple instance), can you let me konw the unix script.

please let me know the implementation steps of unix and Datastge job

Thanks

Srini

Posted: Wed Apr 06, 2011 5:31 pm
by jwiles
You could use a parameterset, build your valueset dynamically from the table and then pass the name of the valueset to the job at runtime. The valueset is just a text file with records of the form:

parameter=value

Easy to create, easy to implement using many methods in and out of DataStage. Each instance would have a valueset created, and you can always remove it at end of job if you wish.

Regards,