What are COBOL equivalents of DB2 data types CHAR, DATE, TIME and TIMESTAMP?


The DATE, TIME and TIMESTAMP DB2 data types occupy 4, 3 and 10 bytes respectively. The memory occupied by the CHAR data types is occupied as per the size given. Below table shows the equivalent COBOL data types for CHAR, DATE, TIME and TIMESTAMP.

DB2 data typeDB2 BytesCOBOL equivalentCOBOL bytes
CHAR(z)zPIC X(z)z
DATE4PIC X(10)10
TIME3PIC X(8)8
TIMESTAMP10PIC X(26)26

Updated on: 14-Sep-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements