How to change decimal default value [38,10] to higher 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

kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

As noted by Craig, whats your end result when you change this?
Dont just rely on Veiw data, look out in the target database.
I tried by changing the data type for that column at source with Decimal[42,2] and couldn't able to view the data itself.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

Post by san_deep »

Thanks Kumar for your time and info.
Kumar_S wrote:whats your end result when you change this? Dont just rely on Veiw data, look out in the target database.
How is it possible to reach upto target if i am not being able to view the data at the source level?

Will the job run when there is a import error at the source level itself?

Please correct if i am going wrong somewhere.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

"Fatal Error: APT_Decimal::assignFromString: the source string (322665901919233341505776723281119128249 ) is out of range for the decimal with precision 38."
Do you get the same error for this case also?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
san_deep
Participant
Posts: 33
Joined: Wed Sep 27, 2006 6:10 am
Location: india

Post by san_deep »

The above error i got while i was converting that number to char by using TO_CHAR function [This is only way i was able view the data at source level] and then using DecimalFromString function in transformer and changing my target data type to Decimal[42,2].

But as per the info from prior post it was suggested that do it without converting it to char.

So i am confused how to do it?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

As suggested, Use TO_CHAR in the source and convert it into Char data type, pass it till the target, and User TO_NUMBER to convert it back to Decimal.
Have you just tried with Decimal[42,2] and run the job (not just view the data)? Did you got any error? Would you be able to find the data in output?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

kumar_s wrote:As suggested, Use TO_CHAR in the source and convert it into Char data type, pass it till the target, and User TO_NUMBER to convert it back to Decimal.
Have you just tried with Decimal[42,2] and run the job (not just view the data)? Did you got any error? Would you be able to find the data in output?
AFAIK - There should be absolutely no need for the TO_CHAR / TO_NUMBER dance. And allegedly no need for any scale on the number. How about we stick with the suggestion of using something like Decimal[40] from end to end and see what happens? Or Decimal[42] it that floats your boat.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I was suggesting to give a run and check the target with Decimal(42). But OP is very sticky with TO_CHAR that you suggested initially as the worst case. :wink:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply