Reading parameter from csv file

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
rafik2k
Participant
Posts: 182
Joined: Wed Nov 23, 2005 1:36 am
Location: Sydney

Reading parameter from csv file

Post 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
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post 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
Wolfgang Hürter
Amsterdam
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post 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
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
rafik2k
Participant
Posts: 182
Joined: Wed Nov 23, 2005 1:36 am
Location: Sydney

Post 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????
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post 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.
Wolfgang Hürter
Amsterdam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply