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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

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