COMP OR COMP-3: WHICH IS FASTER?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: COMP OR COMP-3: WHICH IS FASTER?

Postby BillyBoyo » Sun Apr 22, 2012 2:29 pm

What happened to not shouting?

Is this a question now? If so, please start a new topic, not tag along behind an old an unrelated one.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: COMP OR COMP-3: WHICH IS FASTER?

Postby enrico-sorichetti » Sun Apr 22, 2012 2:35 pm

first... do not use all capitals, it' s shouting
why don' t You look at the cobol manuals Yourself
every is clearly explained there

and as far as how numbers are represented, stored, managed
all is described in detail in the Principles Of Operations
which is a prerequisite reading before looking at the cobol manual
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: COMP OR COMP-3: WHICH IS FASTER?

Postby Robert Sample » Sun Apr 22, 2012 5:31 pm

Deepak kumar25, it is beginning to appear that you do not know enough, and have so many WRONG preconceptions, that you do not belong on a beginner's forum. Let's go over some of the reasons I say this:
1. You have posted, at least twice in this thread, comments about ASCII values. This is a MAINFRAME forum, and mainframes do not use ASCII -- their data is stored in EBCDIC. Terminology is critical in IT, where similar terms may mean very different things. And referring to ASCII when talking about how mainframes store data indicates you have no knowledge, and since you've done it at least twice, you have no interest in learning anything, either.
2. Asking whether COMP or COMP-3 (PACKED DECIMAL) is faster is a pointless question. You must specify the machine for the comparison since different machines implement the instructions differently, so one may be faster for a certain machine but on a different machine the other may be faster.
3. In a day when a COBOL program can perform MILLIONS of lines of code per second of CPU time, why does it matter to you if COMP or COMP-3 is faster? You certainly will not be able to tell unless you are doing hundreds of billions (or more) of calculations.
4. You also mention storage space. And, again, this is a case where specifics are required to give an answer. COMP variables are 2, 4, or 8 bytes that correspond to PIC S9(04) COMP, PIC S9(09) COMP, and PIC S9(18) COMP. So if you are talking about a 1-byte variable, COMP-3 uses less storage whereas if you are talking about a 4-byte variable then COMP uses less storage.
5. The questions you ask are often answered in the COBOL Language Reference and Programming Guide manuals. I STRONGLY recommend you take the time to read these manuals to understand more about COBOL and mainframes.

I am locking this thread since you are not listening to what you are being told. If you attempt to restart any of this discussion again, that thread will be deleted.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post