IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Confusion : INTEGER in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Thu Jan 28, 2010 6:19 pm
Reply with quote

Hi all,
Data type INTEGER has coresponding DCLGEN picture clause of S9(9) COMP.
The range of INTEGER is -2147483648 thru +2147483647.

Can some one explain how this 10-byte value is stored in S9(9) COMP.

Thanks,
Prasad.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 28, 2010 6:24 pm
Reply with quote

Click on the manuals link at the top of the page, find the COBOL Language Reference manual, and read up on COMP and COMP-5 fields and their internal formats. Then go to the COBOL Application Programming Guide and read up on the TRUNC option. If you have questions after reading, please let us know.
Back to top
View user's profile Send private message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Thu Jan 28, 2010 6:54 pm
Reply with quote

Thanks...No more questions..at least not on this forum.....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 28, 2010 8:41 pm
Reply with quote

Hello,

Quote:
Can some one explain how this 10-byte value is stored in S9(9) COMP.
Well, it is not a 10-byte value. . . Very basic understanding has escaped you. . . Which is why the suggestion to read the appropriate documentation was made.

Why would believe it acceptable to ask others to read the manual for you and regurgitate the content here? We are most willing to help people with questions and problems, but are not a manual reading service.

Quote:
Thanks...No more questions..at least not on this forum.....
Ok, bye. . .
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Jan 28, 2010 8:43 pm
Reply with quote

It is not a 10-byte value it is a 10-digit value stored in binary format in a 4-byte zone.
Using it in a COBOL program is where the TRUNC comes in.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Confusion regarding length of SQLCA v... DB2 4
No new posts Confusion b/w index and subscript Mainframe Interview Questions 7
No new posts Syncsort - NULL in Integer field chec... SYNCSORT 4
No new posts Confusion while passing data to a cal... COBOL Programming 5
No new posts PL/I small integer? PL/I & Assembler 3
Search our Forums:

Back to Top