Page 1 of 1

Reading parameter from a file or Table

Posted: Wed Mar 14, 2007 12:30 am
by Das
Hi ,

I wanted to pass one parameter to a DS job from file.Actually the scenario is as follows ,I need to run a DS job N times for some different values of some ids which I can store in a file or a table.

Please let me know is it possible ...?
If possible how can i read parameter vlues from file ..?
Which is the better option sequncer or control job.?

Thanks in advance..

Posted: Wed Mar 14, 2007 12:43 am
by chulett
You'd have more options if you were on a 7.x version, Sequence jobs support looping constructs there. For your version, I'd look into either hand coded job control if you are comfortable with that, or perhaps a job that reads the parameter file/table and leverages the UtilityRunJob function inside the Transformer to run one iteration of your job per record read. You'll need some sort of output from the transformer as well, status of each job run to a flat file would be typical.

Pretty sure that's available in your version.

Posted: Wed Mar 14, 2007 1:22 am
by Das
chulett wrote:You'd have more options if you were on a 7.x version, Sequence jobs support looping constructs there. For your version, I'd look into either hand coded job control if you are comfortable with that, or perhaps a job that reads the parameter file/table and leverages the UtilityRunJob function inside the Transformer to run one iteration of your job per record read. You'll need some sort of output from the transformer as well, status of each job run to a flat file would be typical.

Pretty sure that's available in your version.
hi
While using UtilityRunJob(%JobName%, %ParamsAssignments%, %RowLimit%, %WarnLimit%)in transformar.Can i use as below
the input for the transformar is the file which contains the parameters and job name is the job which i need to run .please tell me about
%RowLimit%, %WarnLimit% fields and How can pass more than one parameter .?

thanks

Posted: Wed Mar 14, 2007 1:55 am
by kumar_s
You can pass the parameters delimited by | characters. Row limit is the number after which the job need to be stopped. And the Warning is the limit is the number of warning after which thejob will abort.
You can use the input values read from file as argument.

Posted: Wed Mar 14, 2007 3:01 am
by Das
kumar_s wrote:You can pass the parameters delimited by | characters. Row limit is the number after which the job need to be stopped. And the Warning is the limit is the number of warning after which thejob will abort.
You can use the input values read from file as argument.
Thanks.
I have two columns Col1 and Col2 in the input parameter file .I need to pass pass both can i use as follows.

UtilityRunJob('DSMyJob',link1.Col1|link1.Col2 ,50,50)

Posted: Wed Mar 14, 2007 3:07 am
by kumar_s
Actaully I never tried. Perhaps try the following

Code: Select all

UtilityRunJob('DSMyJob','Parameter1=':link1.Col1:'|':'Parameter=':link1.Col2 ,50,50).

Posted: Wed Mar 14, 2007 3:10 am
by loveojha2
UtilityRunJob('DSMyJob',link1.Col1|link1.Col2 ,50,50) is not correct.

It should be
UtilityRunJob('DSMyJob','Param1=' : link1.Col1 : '|' :'Param2=' : link1.Col2 ,50,50)

Where Param1, Param2 are the names of the parameter used in DSMyJob.

Posted: Wed Mar 14, 2007 3:11 am
by kumar_s
loveojha2, Thanks for confirming.