Using Job Parameter in Column Generator stage

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
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Using Job Parameter in Column Generator stage

Post by Ragunathan Gunasekaran »

Hi ,
I Have to generate an additional date column in the stream of processing .The date column would be acquiring the value from the job parameters.Can this be achieved using modify stage also . Please suggest ... As i dont find any explicit value specification in the modify stage,i hope modify will not help me much ...If that can be achieved in the col generator stage then how can we pass the job parameter into it

Any idea on this please
Regards
Ragu
dsdeveloper13
Participant
Posts: 10
Joined: Thu Aug 28, 2008 12:40 am

Re: Using Job Parameter in Column Generator stage

Post by dsdeveloper13 »

Additional column is not possible with Modify. You can use a transformer to add the column. If performance is an issue, of course other options have to be explored.
Jasti
Participant
Posts: 44
Joined: Sat Apr 14, 2007 6:34 am
Location: Hyderabad, India

Post by Jasti »

If you want to do that in the modify stage only you need to have the new date column(DateGenerated) from the preceding stages on the input link.And then you can pass the parameter values to the date column in the specification in a modify stage as:
Secification= #jobparameter#=DateGenerated

If you want to use the column generator stage:
Use Algorith=Cycle,Value= #jobparameter# for the DateGenerated column.
Thanks,
Mohan.A.Jasti.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Hi ,
The first option of using generated date column in the preceeding stage is not possible as i dont want to use a transformer.
The second option is helpfull.But i require some help on this please .I have used the cycle algorithm ,initial value as the job parameter and the limit as 1 ,so that it cycles back to the initial value for every record.The problem here is that ,whatever date i give in the job parameter its generating this date only 1965-07-01 .Say i have given 2008-08-28 in the run prompt but it generates for 1965-07-01 for the additional column

If i give it as 2018-08-28 ,it adds 10 days to 1965-07-01 and shows that as 1965-07-11. If i give it as 2000-08-28,then it lessens 8 days from 1965-07-01 and shows that as 1965-06-23

Any help on this please
:roll:


Any clue on this please
Regards
Ragu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Transformer. There's no reason any more not to.

Unless, of course, you don't have a C++ compiler.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Yes Ray , i would be able to use it , but my simple logic to generate the date field fails , i am not sure why its generating this value ....Is there some prediction on this ?
Regards
Ragu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Modify stage does not accept job parameters (I wonder whether Jasti has tested the suggestions made?). This is the fundamental flaw in your "simple logic".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Ray , I am Pointing to my col generator option. I have not used the modify stage option. Since i have used the col gen for most of the skeleton designs that i have developed ,i am finding it bit a difficult to change . . . .
Regards
Ragu
Jasti
Participant
Posts: 44
Joined: Sat Apr 14, 2007 6:34 am
Location: Hyderabad, India

Post by Jasti »

I'm sorry.

Hi Ray,
I have tested that and my approach is wrong here..Secification= #jobparameter#=DateGenerated is not working.
But Modify stage accepts parameters for specifications and we are using parameters to pass the entire KEEP Specification.
Thanks,
Mohan.A.Jasti.
Post Reply