Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
what is SMALLINT datatype in the DB2???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
dhavalev

New User


Joined: 24 Jan 2006
Posts: 2
Location: pune

PostPosted: Mon Feb 20, 2006 3:06 pm    Post subject: what is SMALLINT datatype in the DB2???
Reply with quote

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
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Feb 20, 2006 3:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dhavalev

New User


Joined: 24 Jan 2006
Posts: 2
Location: pune

PostPosted: Tue Feb 21, 2006 9:36 am    Post subject: I want to know the number of digit's it can accomodate???
Reply with quote

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
View user's profile Send private message
pnambiar

New User


Joined: 24 Feb 2006
Posts: 3

PostPosted: Sat Feb 25, 2006 12:11 am    Post subject:
Reply with quote

Check your compile options, TRUNC(BIN) option will cause s9(4) comp to store values between -32768 to +32767.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Moving character data to smallint in db2 rikdeb DB2 5 Thu Jul 14, 2016 12:38 am
No new posts Converting Datatype while adding the ... dsivapradeep DFSORT/ICETOOL 6 Mon Nov 11, 2013 11:17 am
No new posts query in unloading a column defined a... kmk2mani DB2 8 Fri Sep 20, 2013 4:53 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us