Modify Operator - Error

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
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Modify Operator - Error

Post by TonyInFrance »

Morning / Afternoon / Evening folks

I'm using the MODIFY operator to change 950 columns which are decimals at their source. The precision is decimal(31,3) whereas I need them in decimal(15,3)

The syntax I'm using in the MODIFY stage is:

#ZF:decimal(15,3]=#ZF;
#ZG:decimal(15,3]=#ZG;
#ZH:decimal(15,3]=#ZH;
#ZI:decimal(15,3]=#ZI;
#ZJ:decimal(15,3]=#ZJ;
#ZK:decimal(15,3]=#ZK;
#ZL:decimal(15,3]=#ZL;
#ZR:decimal(15,3]=#ZR;

I get the error:

Error parsing modify adapter: Error in binding: Expected destination field selector, got: ";"; input:

Can someone please give me the correct syntax?

Thanks

Tony
Tony
BI Consultant - Datastage
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

My modify stage syntax is a bit rusty, but I would lose the # symbols and/or close the meta data type with parenthesis rather than square brackets.
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Post by TonyInFrance »

I corrected that error. Now I have:

#02:decimal[15,3]=decimal_from_decimal(#02);
#03:decimal[15,3]=decimal_from_decimal(#03);
#04:decimal[15,3]=decimal_from_decimal(#04);
#05:decimal[15,3]=decimal_from_decimal(#05);
#06:decimal[15,3]=decimal_from_decimal(#06);
#07:decimal[15,3]=decimal_from_decimal(#07);
#08:decimal[15,3]=decimal_from_decimal(#08);
#09:decimal[15,3]=decimal_from_decimal(#09);
NOWARN

The job seems to be running fine without any warning.
But on trying to insert this dataset into my table, the insertion job crashes with the message:
Schema reconciliation detected a size mismatch for column #02. When writing column DECIMAL(31,3) into database column DECIMAL(15,3), truncation, loss of precision or data corruption can occur.

Please note that the column in question is the first one. Its almost as if the modify is doing nothing although it appears to be fulfilling its duty since there's no error messages or warnings and the job finishes.

Any ideas?
Tony
BI Consultant - Datastage
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do the metadata on the output link specify Decimal(15,3)?

And you really should try to avoid "#" characters in identifier names, since DataStage uses these to flag job parameter references.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Post by TonyInFrance »

No Ray. I have no metadata defined. The idea is to use RCP.
Avoiding the # can be done if that is the only problem (although that would require me to go through a temp table since the final table has # as column names and that can't change) but at the moment I don't think it is.
Tony
BI Consultant - Datastage
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Post by TonyInFrance »

It appears that RCP doesn't work.

I defined the columns explicitly and now it seems to modify its format correctly.
Tony
BI Consultant - Datastage
Post Reply