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 are the Advantages of using comp-3 variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
kumar40322

New User


Joined: 25 Apr 2009
Posts: 15
Location: Hyderabad

PostPosted: Thu Aug 06, 2009 11:02 pm    Post subject: What are the Advantages of using comp-3 variables
Reply with quote

Hi

What are the Advantages of using comp-3 variables?Whether we can see comp-3 variables?If so how?
Back to top
View user's profile Send private message

Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Aug 06, 2009 11:19 pm    Post subject:
Reply with quote

Each digit only takes 1/2 byte, plus 1/2 byte for the sign (even if it is unsigned).
You may view it the same ways you view other variables but you may need to turn hex on in order to understand it better.
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 Aug 06, 2009 11:26 pm    Post subject:
Reply with quote

Hello,

In addition to the space savings, Packed-decimal (comp-3) provides better performance than Zoned-decimal in computations.

Some instructions require packed-decimal data, so if the field is not already packed-decimal, it must be converted to packed-decimal to be used. This is automatically done by the complier, so many people do not even know it happens.
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Fri Aug 07, 2009 8:45 am    Post subject:
Reply with quote

Hi,
Have a look at this may be this will help u
for comp3
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Aug 07, 2009 9:13 am    Post subject:
Reply with quote

The best place to look for how data is stored is the COBOL Language Reference Manual. The Programming Guide, I think, will give tips on which pictures and usage clauses are the best to use for any given purpose.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm

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