What is zonal decimal in Cobol?

Showing Answers 1 - 6 of 6 Answers

kanian

  • Nov 22nd, 2007
 

Zonal decimal is nothing but our simple declaration. Simple declaration means each digits count as a bytes. 
For exaple. 77 A pic 99. Now A  is  2 bytes(99(2 digits) counts 2 bytes
compare:
  77 A pic 9(4) comp => A has 2 bytes.
  77 A pic 9(4)          => A has 4 bytes---------------> this is called zonal decimal

  Was this answer useful?  Yes

If you mean zoned decimal, it is an external decimal numeric type in COBOL and may be defined using 9,V,S,P in the declaration.

E.g. S9(3)V99.

The usage for this declaration is DISPLAY. The range for this format is from 1 to 18 if the compiler option set is ARITH(COMPAT) and is from 1 to 31 if the option is ARITH(EXTEND).

The space occupied by zoned decimals is the same as the declaration.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions