thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hi amr
comp4 is just like as binary or comp
01 x pic 9(4) comp.
in above example it takes 2 bytes.
01 x pic 9(5) comp5.
in this example also it takes 4 bytes . it is not depend on legth specified in cobol.It will consontrate on value wich you stored in this field.
Table 5. Ranges in value of COMP-5 data items
PICTURE Storage representation Numeric values
S9(1) through S9(4) Binary halfword (2 bytes) -32768 through +32767
S9(5) through S9(9) Binary fullword (4 bytes) -2,147,483,648 through
+2,147,483,647
S9(10) through S9(18)Binary doubleword (8 bytes)
-9,223,372,036,854,775,808 through +9,223,372,036,854,775,807
9(1) through 9(4) Binary halfword (2 bytes) 0 through 65535
9(5) through 9(9) Binary fullword (4 bytes) 0 through 4,294,967,295
9(10) through 9(18) Binary doubleword (8 bytes)
0 through 18,446,744,073,709,551,615
thanks,
thanooz. |
|