Hi
I am new to data stage.
when i am writing decimal onto a file its giving an extra space for the sign . it is possilbe to write without sign space.can any one tell how can we do this .
i tried below ways.
using Abs ,DecimalToDecimal functions
configuring the properties in the sequential file stage like Packed.
Thanks In Advance
discarding sign byte for a decimal when writing it to a file
Moderators: chulett, rschirm, roy
-
KishoreRaju
- Participant
- Posts: 5
- Joined: Thu Feb 15, 2007 12:17 pm
- Location: bhimavaram
- Contact:
-
KishoreRaju
- Participant
- Posts: 5
- Joined: Thu Feb 15, 2007 12:17 pm
- Location: bhimavaram
- Contact:
Thanks for the quick reply.
The complete description about my senario.
input-OralceStage-->Transformer--SequentialStage(Flat file fixed width)
i have data stage job which is retrieving a decimal of size (15,2) and in the target i have to map it to (5,2).
in the transformer i created two stage variables
indecimal-->decimal(5,2)
decToCahr-->char(6).
first i am mapping source decimal to Transformer stage variable(it is doing implicit truncation if possilbe if source is bigger then its throwing an exception.
after that i am converting it to char by using the below function
DecimalToString(VarTRPCT,"fix_zero").
this is giving a string of 7 characters(one for space and one for period).
on the above i am appling a substring function to get ride of sign.
is there is any other simple way that makes my life easy.
The complete description about my senario.
input-OralceStage-->Transformer--SequentialStage(Flat file fixed width)
i have data stage job which is retrieving a decimal of size (15,2) and in the target i have to map it to (5,2).
in the transformer i created two stage variables
indecimal-->decimal(5,2)
decToCahr-->char(6).
first i am mapping source decimal to Transformer stage variable(it is doing implicit truncation if possilbe if source is bigger then its throwing an exception.
after that i am converting it to char by using the below function
DecimalToString(VarTRPCT,"fix_zero").
this is giving a string of 7 characters(one for space and one for period).
on the above i am appling a substring function to get ride of sign.
is there is any other simple way that makes my life easy.
-
KishoreRaju
- Participant
- Posts: 5
- Joined: Thu Feb 15, 2007 12:17 pm
- Location: bhimavaram
- Contact:
