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

Significance of using COMP-4 and COMP-5


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

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Fri Jan 20, 2006 7:24 pm
Reply with quote

What is the significance of using COMP-4 and COMP-5 in cobol?
I want to know whether any other usage clauses are there apart from the usage clauses COMP,COMP-1,COMP-2,COMP-3..
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Fri Jan 20, 2006 7:33 pm
Reply with quote

Muthuvel,

Check the manual at this site and search for 'comp'. You'll find this:

COMPUTATIONAL or COMP
Representation of the COMPUTATIONAL phrase is system-dependent and is
normally assigned to representations that yield the greatest
efficiency when arithmetic operations are performed on that system.


Then read whatever you're interested in. The manual can tell you all you need to know. If you've got any specific questions get back to me.

Cheers,
Back to top
View user's profile Send private message
kndeepthi

New User


Joined: 20 Jan 2006
Posts: 4

PostPosted: Sun Jan 22, 2006 9:50 pm
Reply with quote

comp,comp-1,comp-2,comp-3,comp-4 all are used for arithmetic purposes.

comp/comp-4 is similar.data is stored in binary format.and we use picture clause here.

i dont know about com-5.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jan 23, 2006 1:11 am
Reply with quote

All data is stored in binary format. The USEAGE clause tells the compiler how to interpret it.

DISPLAY is another data format. You don't see it much because it is the default.

DISPLAY-1 is DBCS format.

Take a look at the IBM Manuals on this site. The are quite good.
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