Decimal format

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Decimal format

Post by altruist »

Hi,

I am slightly confused with decimal format. Can you please clarify the below to me.

DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99

Am I right over here?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

The first argument is total number of digits. The second argument is number of digits after the decimal point.
Choose a job you love, and you will never have to work a day in your life. - Confucius
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Post by altruist »

Does the first argument include or exclude the sign.
DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0 OR Minimum Value = 0.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99 OR Minimum Value =-99.99
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The first argument does NOT include the sign. The definition ("digits") is correct.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Post by altruist »

So in my case, are the highlighted one's the correct values
DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0 OR Minimum Value = 0.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99 OR Minimum Value =-99.99
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Minimum value for signed decimal[1,0] is -9.0.
Minimum value for unsigned decimal[1,0] is 0.0.
Minimum value for signed decimal[5,2] is -999.99.
Minimum value for unsigned decimal[5,2] is 0.0 (which is the same as 000.00).
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