For Binary (COMP) items, does the Sign representation occupy



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

For Binary (COMP) items, does the Sign representation occupy

Postby Adolph san » Thu Jul 01, 2010 1:08 am

For Binary (COMP) items, does the Sign representation occupy storage?
For example,
05 A PIC S9(3) COMP.
How many bytes does it occupy?
Adolph san
 
Posts: 4
Joined: Tue Jan 26, 2010 10:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: For Binary (COMP) items, does the Sign representation occupy

Postby Robert Sample » Thu Jul 01, 2010 1:26 am

2 bytes.

The sign is the first bit of the memory location (zero means positive, one means negative).
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


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post