Page 1 of 1

Question on Trailing Decimal in Sequential File

Posted: Thu Aug 07, 2014 3:27 pm
by JPalatianos
Hi,
We are reading in data from a Mainframe DB2 table defined as Decimal(3,0) and we are just passing this field through a transformer with the same metadata from the DB2 connector. The sequential file for this field ends up with a trailing decimal, is that expected?
ex: 123.

I know we can manipulate teh output if we declare it as a Varchar and do some basic string manipulation but wanted to check if this is the expected outcome for this scenario.

Thanks - - John

Posted: Thu Aug 07, 2014 4:02 pm
by ray.wurlod
Yes it is expected. When converting decimal to string DataStage adds a decimal placeholder and sufficient leading and trailing nonsignificant zeroes to make it clear what the precision and scale settings are.

Posted: Thu Aug 07, 2014 4:08 pm
by JPalatianos
Hi Ray,
In our situation we are not converting to a string and the target column on teh sequential file is defined as Decimal(3). Is this behavior still expected in this scenario?
Thanks - - John

Posted: Thu Aug 07, 2014 4:25 pm
by ray.wurlod
You ARE converting to a string, because a text file does not have data types - it only has text (string).

Actually, it's the export operator that is performing the conversion.

Posted: Thu Aug 07, 2014 4:28 pm
by JPalatianos
Thank You!!