Skip to content

DBzTech-Technology Dossier

A repository of technical findings.

Menu
  • COBOL
  • DB2
  • SAS
  • JCL
  • Google Cloud
  • AI
Menu
zoned decimal representation in cobol

What is Zoned Decimal In COBOL

Posted on June 21, 2024May 16, 2026 by DBZtech

The two computer codes mostly used for internal binary representation are EBCDIC and ASCII. Mainframe uses EBCDIC coding system. In EBCDIC, each byte consists of eight bits which are subdivided into two 4 bit segment; The Zone part(First 4 bits) and the Digit part(last 4 bits).For Reference the following table shows the mapping of the characters and numbers with their binary representation and their Hex values. Each 4 bit is represented by on Hexadecimal character.

With HEX mode is turned on in ISPF, the same information can be seen against the characters and the special characters which we type.

In zoned decimal field stores one numeric digit in each byte of storage. Consider the number 185. Internally it is stored as shown below.

‘F’ indicates unsigned byte. For unsigned ,zoned-decimal fields are considered positive. Thus 185 will be stored as shown below.

For a signed integer will have the sign stored in the zone portion of the rightmost byte. All the other Zone portions will be ignored. X’Cn’ is used as an explicit positive sign and a X’Dn’ is used as an explicit negative sign. Thus, negative -185 would look like:

©2026 DBzTech-Technology Dossier | Design: Newspaperly WordPress Theme