Dynamic Parameters

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Dynamic Parameters

Post 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?
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post 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.
Kandy
_________________
Try and Try again…You will succeed atlast!!
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post 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?
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post 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?
mailravi.dw@gmail.com
Participant
Posts: 19
Joined: Sat Dec 19, 2009 8:50 am
Location: Chennai

Post 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
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post 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?
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

You can call IConv and OConv functions only from BASIC Transformer stage in the parallel job.
You are the creator of your destiny - Swami Vivekananda
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post 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?
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Sequence job is a server job. You can call IConv and OConv functions from User Variable activity
You are the creator of your destiny - Swami Vivekananda
agpt
Participant
Posts: 151
Joined: Sun May 16, 2010 12:53 am

Post 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?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Yes
Post Reply