Question on Trailing Decimal in Sequential File

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
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Question on Trailing Decimal in Sequential File

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thank You!!
Post Reply