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

Why COMP-3 is used other than COMP


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

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Fri Feb 01, 2008 3:12 pm
Reply with quote

We hear that COMP-3 is more widely used compared to COMP. Could anyone please explain the reason? COMP-3 occupies one byte more than COMP (n/2 +1), still COMP-3 seems to be preferred?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 01, 2008 3:28 pm
Reply with quote

this should also be on the not to ask list.

this has been discussed many times.
Back to top
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Fri Feb 01, 2008 4:25 pm
Reply with quote

I did a search in the forum but couldn't find anythin which could answer my question. Pardon me if I have not searched enough. Any info you could provide me for this would be appreciated.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Feb 01, 2008 9:01 pm
Reply with quote

Hello,

Quote:
COMP-3 occupies one byte more than COMP (n/2 +1), still COMP-3 seems to be preferred?
The size of the field is usually of minor concern.

Packed-decimal (comp-3) has long been the preferred way to store things like quantities and amounts and for use in computations. Part of this was that comp-3 takes considerable less space than zoned-decimal. Another (and i believe larger) part is that the mainframe has assembler packed-decimal instructions that are required to "edit" values for readability. If an amount was stored in a comp field, internally it must be converted to comp-3 in order to show commas, a decimal point, a minus, etc.
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Fri Feb 01, 2008 10:58 pm
Reply with quote

dbzTHEdinosauer,

If you can send the links of the topics already posted, it would be appreciated. Recently, everyone keep sending that the topic is already discussed. I think it may be easier for them than answering.

Thanks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 01, 2008 11:06 pm
Reply with quote

I think you all believe that we should continue to answer questions that have already been posted, since it would be easier for you to read our answer instead of lllllllllllllllllllllllooooooooooooooooooookkkkkkkkkkking for the answer - as many of us have had to do over the years.

when i started there was no internet, no access to pubs/docs other that what was at the site --- usually under lock and key.

so surfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
have a good weekend.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Feb 01, 2008 11:16 pm
Reply with quote

Hello,

Quote:
Recently, everyone keep sending that the topic is already discussed.
In a great number of these replies there are also links to some of the previous topics.

Keep in mind that on many forums (not ours, but other stricter forums), the requestor must show how they tried to find their answer or their post is deleted.
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Sat Feb 02, 2008 12:43 am
Reply with quote

Thanks dbzTHEdinosauer and Dick.

I am not pointing to any of you but I have seen some messages, sent by some users, seemed to be posted because they want to reply for a question.

Regards.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Feb 02, 2008 12:57 am
Reply with quote

You're welcome (i think) icon_smile.gif

Quote:
but I have seen some messages, sent by some users, seemed to be posted because they want to reply for a question.
I do not understand this. Please clarify.
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Sat Feb 02, 2008 1:33 am
Reply with quote

I will show you few messages of that kind and you can easily understand.

Stay tuned.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Feb 02, 2008 9:33 pm
Reply with quote

Hi,

Think ..if you have a small own Library at Home & I insist You to fill up the whole library with single book...!!... What'll be Your reaction...now think about Moderators or Seniors of this Forum who answerd the same question many times & then one day some of You again insist to answer the same question...

If You have 'same' question then search & add Your query in the existing thread...that will be viewd by many & will be answerd if some one would be knowing the answer, I'm sure.

Don't get annoyed if some one says 'it's been discussed'..just try to search some similar matches & put 'modified' query on the same topic there (I hope moderators agree here)...we are here to help each other
..and here is the link which lists the topic not elligible for discussion...check there which topic comes under such list... for others keep us posted... 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 Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top