- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the COBOL host variable equivalent for various DB2 data types?
The host variables are used to transfer the data from DB2 to program and vice versa.For each DB2 table column we have a COBOL equivalent host variable defined. The host variables can be generated automatically using the DCLGEN utility or we can explicitly give the host variables in the working storage section of the COBOL-DB2 program.
The COBOL equivalent of various DB2 data types is mentioned in the table below.
DB2 data types | COBOL equivalent |
---|---|
SMALLINT - 2 bytes | PIC S9(4) COMP |
INTEGER - 4 bytes | PIC S9(9) COMP |
TIMESTAMP - 10 bytes | PIC X(26) |
CHAR - 5 bytes | PIC X(5) |
- Related Articles
- What is COBOL host variable equivalent for various DB2 data types?
- What are the default values used by DB2 for various data types?
- Convert DECIMAL(7,3) into equivalent COBOL host variable PIC form.
- What are COBOL equivalents of DB2 data types SMALLINT, INTEGER and DECIMAL?
- What are COBOL equivalents of DB2 data types CHAR, DATE, TIME and TIMESTAMP?
- What is the usage and purpose of DCLGEN and host variables used in COBOL-DB2 program
- How to truncate trapping of a DB2 column data when assigned to a host variable
- How will the COBOL-DB2 program behave when there is a mismatch between the host variable and number of columns in the SELECT statement?
- What are various Text data types in Python pandas?
- What are the various techniques for data extraction?
- What are the various tools for Data Warehouse Quality?
- What are the various types of contracts?
- What are the various types of branches?
- How does DCLGEN utility accommodate NULL host variable for VARCHAR(n) data type?
- What are the steps involved to use a CURSOR in any COBOL-DB2 program?

Advertisements