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

DB2DatabaseBig Data Analytics

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
raja
Published on 14-Sep-2020 11:14:52
Advertisements