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

Difference between COMP & COMP-5


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
skcvasanth

New User


Joined: 27 Jul 2009
Posts: 3
Location: Pune

PostPosted: Mon May 03, 2010 5:12 pm
Reply with quote

Hi Everyone,

Can anyone guide me the exact difference between comp & comp-5 and at what situation we use comp-5 ? I tried to google it but i didn't get exact about COMP-5.

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

Global Moderator


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

PostPosted: Mon May 03, 2010 5:19 pm
Reply with quote

There is a link to manuals at the top of this page. Click on it, find the COBOL Language Reference manual, and look up COMP-5 in it (hint: the flashlight is the search icon).
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Mon May 03, 2010 5:24 pm
Reply with quote

Hi,

From one of the Bill O'Boyle's posts...
Quote:
COMP-5 was introduced with OS/390 COBOL 2.2.1 and is known as "Native Binary".

The "TRUNC" option has no effect on COMP-5 variables.

Similar to the "TRUNC(BIN)" option, COMP-5 variable values are never truncated based upon their PICTURE clause number of digits.

Internally to ensure this, the compiler uses ICM and STCM instructions on COMP-5 non-float variables to avoid truncation.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon May 03, 2010 5:35 pm
Reply with quote

try searching this forum for Bill O'Boyle and comp-5.
I know that he has posted explanations about 10 times.
Back to top
View user's profile Send private message
skcvasanth

New User


Joined: 27 Jul 2009
Posts: 3
Location: Pune

PostPosted: Mon May 03, 2010 8:31 pm
Reply with quote

Thanks All for ur suggestions... icon_smile.gif
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top