Page 1 of 1

Reading parameter from csv file

Posted: Thu May 31, 2007 1:31 am
by rafik2k
Hi All,
Can anyone of you give hints how to read parameter from csv file.

I have value like this

Parameter name value
etl_run_date '2004-05-01'
etl_run_date '2005-05-01'
etl_run_date '2006-05-01'
etl_run_date '2007-05-01'


For first run, i want to use first parameter value, for second run i want to use second parameter value and so on.


I tried searching in archived but could not get desired information.

Any help or link to previous post would be helpful for me.

Much Appreciated.


Thanks

Posted: Thu May 31, 2007 2:30 am
by WoMaWil
Hi Rafik from 2nd (k)lasse,

you cannot load or change parameters after your job is started. That you will learn in future in 3rd (k)lasse.

What you can do is:

Write a sequence

Posted: Thu May 31, 2007 2:47 am
by JoshGeorge
Multiple instance job invoked thru a loop inside a sequence might be what you are looking for. Check out this discussion for more information :
http://dsxchange.com/viewtopic.php?p=23 ... 45c#236067

Posted: Thu May 31, 2007 2:48 am
by rafik2k
WoMaWil wrote:Hi Rafik from 2nd (k)lasse,

you cannot load or change parameters after your job is started. That you will learn in future in 3rd (k)lasse.

What you can do is:

Write a sequence

I didn't get you. Could you clearify the same.

BTW what's (k)lasse????

Posted: Thu May 31, 2007 5:48 am
by WoMaWil
(K)lasse is a guess what the "K" in your name stands for. Am I wrong?

Beside DataStage Jobs you can also develop DataStage Sequences. This might be a solultion for your problem.

An other a bit old fashion is to work with dsjob on your server, there you can nourish the parameters by job start.

Posted: Thu May 31, 2007 6:20 am
by chulett
If you are on a 7.5.x version and thus have the new Start Loop, End Loop and UserVariables stages you can build a looping Sequence job. You would first get a list of your parameters from the file using the UserVariables stage and then it would pass them, one at a time, to your Loop that runs the processing job over and over until it runs out parameters.

Check the Server Job Developer's Guide for examples of the stages and their usage.