Difference between comp and comp4



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

Difference between comp and comp4

Postby Nazma » Thu Jul 30, 2009 7:10 pm

Hi,

Can anyone explain me what is the difference between comp and comp4.

Regards,
Nazma
Nazma
 
Posts: 7
Joined: Fri Jun 13, 2008 4:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between comp and comp4

Postby swd » Thu Jul 30, 2009 7:35 pm

To my knowledge there is no difference, they are both binary fields. You can specify BINARY, COMP or COMP-4, but they are all the same. At least this is my understanding. I use COMP in any code I write, but I have seen BINARY and COMP-4 used.
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between comp and comp4

Postby dick scherrer » Fri Jul 31, 2009 7:31 am

Hello,

Please see if this clarifies:
http://publibz.boulder.ibm.com/cgi-bin/ ... 5.3.12.3.2?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Difference between comp and comp4

Postby Anuj Dhawan » Mon Aug 17, 2009 3:19 pm

Both are equivalent of BINARY.
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post