Page 1 of 1

Dynamic Parameters

Posted: Mon Sep 13, 2010 11:26 am
by agpt
Hi,

I have to schedule a job which would run on 2nd of every month. It would take last month's file as input. For example suppose this is being run on 2nd Aug, so it would use the input file of Jul. File have extension as yyyymm eg: abc201007. How can I pass a parameter whose values would dynamically change every month?

Posted: Mon Sep 13, 2010 12:33 pm
by kandyshandy
Using Date function, you can know current date. From there, you can extract what you want and form a string (yyyymm) and then pass it as a parameter. This can be completely automated to run every month.

Posted: Mon Sep 13, 2010 10:52 pm
by agpt
kandyshandy wrote:Using Date function, you can know current date. From there, you can extract what you want and form a string (yyyymm) and then pass it as a parameter. This can be completely automated to run every month.
File name is input parameter as in say input file for a transformaer stage. I can get this yyyymm value in a transformer in stage variable but how do I asign it to input file name?

Can you please help em a bit more on this?

IS there any way except unix scripting?

Posted: Mon Sep 13, 2010 11:26 pm
by agpt
Can I use user activity stage to create a variable who would have value abc201007
so basialy I want to do abc:transforms to append 201007.

Is it doable? if yes, how exactly?

Posted: Tue Sep 14, 2010 12:27 am
by mailravi.dw@gmail.com
Use variable acvity and apply functions like iconv, Oconv then you easily get it through. if you need full information on iconv and oconv then refer the documentation. it clearly explained.

Thanks
Ravi

Posted: Tue Sep 14, 2010 11:51 am
by agpt
mailravi.dw@gmail.com wrote:Use variable acvity and apply functions like iconv, Oconv then you easily get it through. if you need full information on iconv and oconv then refer the documentation. it clearly explained.

Thanks
Ravi
Can we use iconv and oconv functions in parallel stage?

Posted: Tue Sep 14, 2010 12:15 pm
by anbu
You can call IConv and OConv functions only from BASIC Transformer stage in the parallel job.

Posted: Tue Sep 14, 2010 12:23 pm
by agpt
anbu wrote:You can call IConv and OConv functions only from BASIC Transformer stage in the parallel job.

So it means I can't use these in user activity stage. How can I get it then?

Posted: Tue Sep 14, 2010 1:03 pm
by anbu
Sequence job is a server job. You can call IConv and OConv functions from User Variable activity

Posted: Wed Sep 15, 2010 4:57 am
by agpt
anbu wrote:Sequence job is a server job. You can call IConv and OConv functions from User Variable activity
is it :shock:

can i call parallel job using sequence then?

Posted: Wed Sep 15, 2010 4:58 am
by Sainath.Srinivasan
Yes