View previous topic :: View next topic
|
Author |
Message |
dasan
New User
Joined: 24 Oct 2006 Posts: 10
|
|
|
|
Hi,
How to define an binary number in Cobol? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
use COMP:
PIC S9(4) COMP for halfword
PIC S9(8) COMP for fullword |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
COMP is the binary represention of data item in COBOL
Ex:-
ws-cop pic S9(4) COMP |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Defining a binary number means what?
COMP only converts the number to binary at the time of storage
so it increases the speed of arithmatic operations is that what you asked |
|
Back to top |
|
|
|