I have a file which has a Packed Decimal Date (YYYYMMDD) in a char field.
When I import this data in using Data Manager, how do I convert the Packd Decimal to an Integer value so I can get the date value.
Hi. Just use a toInteger() function in your derivation if you want to convert it to an integer value.
Cheers!
MF.
Sent from my iPad using Tapatalk HD
Hi,
It's returning a 0 value.
Could the issue be due to the packed decimal being in a char field?
my 2 cents...
I am just thinking if you have configured your definition file to take the type of this field as integer and it woould flow through as an integer. Also check the data
type of this column at the data stream too
It's not from a flat text file.
It's from a table on an iSeries server
ok...it looks a bit strange and cant think any more, other than checking for the spaces before or after the yyyymmdd
What results do you get if you use a toChar() function on the item before you use toInteger()? Does this parse and work ok?
MF.
When I use ToChar(), I get 0 instead of the actual number.
Bizarre! I have not seen that before. If you create a new datastream item with a Type of Integer, then map your date field to this, do you see the expected value in the datastream item, or still zero?
MF.