Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Confusion : INTEGER in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Confusion : INTEGER in DB2
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: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jan 28, 2010 6:24 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jan 28, 2010 8:41 pm    Post subject: Reply to: Confusion : INTEGER in DB2
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    Post subject:
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    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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Confusion while passing data to a cal... amitc23 COBOL Programming 5 Mon Mar 07, 2016 12:36 pm
No new posts PL/I small integer? John Poulakos PL/I & Assembler 3 Wed Dec 24, 2014 2:22 am
No new posts SuperC comparison confusion Ashish.Srivastava.123 TSO/ISPF 1 Tue Aug 12, 2014 4:21 am
No new posts 64bit integer in PLI sabav42 PL/I & Assembler 1 Thu Jun 26, 2014 8:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us