Inserting a value for a field in column generator

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
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Inserting a value for a field in column generator

Post by poornima.chandramouli »

I'm generating a column using column generator.
Is it possible to pass a value for this column in column generator itself.
I want to pass the value as 'D' for this column for all the records.

Thanks in advance.
Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Cycle with just one Value, "D".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Post by poornima.chandramouli »

ray.wurlod wrote:Use a Cycle with just one Value, "D". ...
where should i give this value in coulmn generator :?
Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As the Generator property for the field for which you want to generate the value.

Right click on this field in the Columns grid, choose Edit Row from that menu, and fill in the Generator property sub-options from the Available Properties to Add.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Post by poornima.chandramouli »

ray.wurlod wrote:As the Generator property for the field for which you want to generate the value.

Right click on this field in the Columns grid, choose Edit Row from that menu, and fill in the Generator property s ...
I'd set the generator property with algorithm = alphabet & the string = D

But now 'D' was not getting populated for that column for all the records.

I've 10 records in which 'D' is getting populated for only 5 records & for the other 5 records it is blank :(

How to get the value as 'D' for all the records for this column.
Regards
Jasti
Participant
Posts: 44
Joined: Sat Apr 14, 2007 6:34 am
Location: Hyderabad, India

Post by Jasti »

Try using Algorith=Cycle,Value= D..this is working fine..
Thanks,
Mohan.A.Jasti.
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Post by poornima.chandramouli »

Jasti wrote:Try using Algorith=Cycle,Value= D..this is working fine..
Thanks It is working fine.

:lol:
Regards
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Re: Inserting a value for a field in column generator

Post by poornima.chandramouli »

poornima.chandramouli wrote:I'm generating a column using column generator.
Is it possible to pass a value for this column in column generator itself.
I want to pass the value as 'D' for this column for all the records.

Thanks in advance.
A small clarification.
Like if my column value is decimal,Then how could i set the default value as 0.00 in coulmn generator.

Thanks in advance.
Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use exactly the same technique. A Cycle with a single value of 0.00.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply