View previous topic :: View next topic
|
Author |
Message |
kumar40322
New User
Joined: 25 Apr 2009 Posts: 15 Location: Hyderabad
|
|
|
|
Hi
What are the Advantages of using comp-3 variables?Whether we can see comp-3 variables?If so how? |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
Hi,
Have a look at this may be this will help u
for comp3 |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|