- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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 COBOL equivalents of DB2 data types SMALLINT, INTEGER and DECIMAL?
The DCLGEN utility converts the table column from DB2 data types to host variables having equivalent COBOL data types. The SMALLINT and INTEGER is converted to COBOL signed numeric data types and DECIMAL is converted to COBOL signed numeric with implied decimal. Below are the equivalent COBOL data types for SMALLINT, INTEGER and DECIMAL.
|DB2 data type||DB2 Bytes||COBOL equivalent||COBOL bytes|
|SMALLINT||2||PIC S9(4) COMP||2|
|INTEGER||4||PIC S9(9) COMP||4|
|DECIMAL(x,y)||INT(x/2)||PIC S9(x-y)V9(y)||INT(((p+q)/2) +1)|
- What are COBOL equivalents of DB2 data types CHAR, DATE, TIME and TIMESTAMP?
- What are the COBOL host variable equivalent for various DB2 data types?
- What is COBOL host variable equivalent for various DB2 data types?
- What are the default values used by DB2 for various data types?
- Purpose and usage of SAVEPOINT in COBOL-DB2 program
- How to verify NULL value in DB2 column data using COBOL paragraph?
- What are the steps involved to use a CURSOR in any COBOL-DB2 program?
- What is the usage and purpose of DCLGEN and host variables used in COBOL-DB2 program
- How to precompile a COBOL-DB2 program?
- Steps involved in compilation of a COBOL-DB2 program
- Implementation of restart logic in a COBOL-DB2 program
- Impact of database downtime on the COBOL-DB2 program
- What is the purpose and usage of “WHERE CURRENT OF” clause in a COBOL-DB2 program?
- What is the purpose and usage of “FOR UPDATE OF” clause in a COBOL-DB2 program