Space prefix in decimal value

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
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Space prefix in decimal value

Post by mallikharjuna »

Hi,

We are using RCP and schema files in our etl jobs. I am extracting data from table and loading in file. I am facing 2 issues

1) space is prefixed for decimal values, when i tried to load in file.
Ex: if value is 10.1 in source then " 10.1 in file, one space before value 10.

2) if source data type is number (6,2) and value is 4.2 then output file having files prefix with zero's and appending with zeros
0004.20
MALLI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Both of those are examples of How It Works with numeric values in a flat file. The space is a place holder for the sign (i.e. where the minus sign would go if it was negative) and the leading zeroes are not significant. I know it's not how you want it to look but neither one should be causing a problem when the file is consumed. Are they actually causing a problem?

Using RCP complicates this as normally one would need to target a string and explicitly reformat the decimal output to your liking.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Post by mallikharjuna »

Thanks Chulett
MALLI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Still curious if this formatting is actually causing a problem for whatever is consuming the file...
-craig

"You can never have too many knives" -- Logan Nine Fingers
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Post by mallikharjuna »

We have to send this data to downstream system.I think downstream can handle this data . the question from downstream system is why the file data not exactly same as database.
now it becomes like quality issue.


Thanks
Mallikharjuna Reddy
MALLI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm going to mark this as Resolved for the moment. If you need more information or are looking for alternatives, please feel free to open this back up and let us know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The data ARE the same as in the database. Decimal numbers are stored in some kind of binary or packed decimal format.

It's the presentation layers that are different.
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