Implied decimals
Moderators: chulett, rschirm, roy
Implied decimals
I am reading a fixed width sequential file that contains fields with implied decimals. One field is 9 (8) V9 (2) in this field the data would look like this: 0001234512. My target is a SQL table with a varchar(10) field. I need for this value to appear in the table as ' 12345.12'. My first attempt was to use a combination of DecimalToString(StringToDecimal(value)/ 100) in a transformer stage but this yielded a blank string. Any suggestions?
To keep it simple, I coded my similar situation DecimalToString to a VarChar stage variable, then used Trim(stage-variable) to the output column.
Check the field properties of your pic 9(08)v9(2) input column. Make sure it's defined as decimal (10,2) with display length of 10, and that your stage variable has a max value of at least 10.
I know we can do this in one derivation, but all the intermediate fields seems to trip me up. Good luck. :D
Check the field properties of your pic 9(08)v9(2) input column. Make sure it's defined as decimal (10,2) with display length of 10, and that your stage variable has a max value of at least 10.
I know we can do this in one derivation, but all the intermediate fields seems to trip me up. Good luck. :D
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872