View previous topic :: View next topic
|
Author |
Message |
dhavalev
New User
Joined: 24 Jan 2006 Posts: 2 Location: pune
|
|
|
|
hi ...
I want to ask how much digit can it store in the SMALLINT datatype of the Db2...
I know that SMALLINT - pic s9(4) comp or COMP4
----------------------------------------------------------
suppose if we declare
I_MOD_YR SMALLINT
then can I_MOD_YR - can have value
'9999'
or '99999'
or '-99999'
or any one of the above
just clarify my doubt ????
because in my case I_MOD_YR is storing '99999' and '-99999' |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
From the fine manual:
Quote: |
A small integer is a System/390 binary integer with a precision of 15 bits. The range of small integers is -32768 to +32767. |
O. |
|
Back to top |
|
|
dhavalev
New User
Joined: 24 Jan 2006 Posts: 2 Location: pune
|
|
|
|
I know that SMALLINT - pic s9(4) comp or COMP4
----------------------------------------------------------
suppose if we declare
I_MOD_YR SMALLINT
then can I_MOD_YR - can have value
'9999'
or '99999'
or '-99999'
or any one of the above
just clarify my doubt ????
because in my case I_MOD_YR is storing '99999' and '-99999' |
|
Back to top |
|
|
pnambiar
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
Check your compile options, TRUNC(BIN) option will cause s9(4) comp to store values between -32768 to +32767. |
|
Back to top |
|
|
|