Passing Parameters for Multiple instance DS job

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
srinivas Guduru
Premium Member
Premium Member
Posts: 38
Joined: Sat Dec 29, 2007 9:58 am

Passing Parameters for Multiple instance DS job

Post 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
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Post 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
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post 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?
Arun
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
srinivas Guduru
Premium Member
Premium Member
Posts: 38
Joined: Sat Dec 29, 2007 9:58 am

reading parameter values from table and passing them to job

Post 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
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply