- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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
Mandalika has Published 473 Articles
Mandalika
413 Views
The DB2 table contains a number of columns whose value will remain unique in the entire table. Among these multiple columns only one column is selected as the primary key and the remaining keys are known as candidate keys.We can declare any candidate key as an alternate key. Which means ... Read More
Mandalika
201 Views
The SQLWARN3 field in SQLCA is used to detect the condition wherein the number of the resultant columns is greater than the number of host variables given in the query of a COBOL-DB2 program. The SQLWARN3 is a 1 byte field, which contains the value ‘W’when there is mismatch in ... Read More
Mandalika
151 Views
There are situations in which DCLGEN members are not used and the host variables declarations are done explicitly in the working storage section. However, due to these explicit declarations there are chances of human errors. One such error is declaring incorrect data length of COBOL equivalent host variables.For example, the ... Read More
Mandalika
1K+ Views
The DCLGEN member contains two important sets of data.The table structure containing definitions of all the columns present in the table.The host variable declaration in equivalent COBOL data types.Including the DCLGEN member is not mandatory until we explicitly give the host variables declaration in the working storage section. But it ... Read More
Mandalika
1K+ Views
The SQLCODE field of SQLCA is used to get the return code for the last executed SQL query from DB2 to COBOL program. Below are the range of return codes which SQLCODE field can take along with their significance.SQLCODE = 0 → Query executed successfully without any issue.SQLCODE > 0 ... Read More
Mandalika
1K+ Views
The SQLCA helps in the communication between DB2 and COBOL-DB2 program. The SQLCA has multiple fields which gives us different information regarding the last executed SQL query.The SQLCA is mandatory in a COBOL-DB2 program. However, if we do not give the SQLCA using the INCLUDE statement then the program compilation ... Read More
Mandalika
1K+ Views
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 bytesCHAR(z)zPIC X(z)zDATE4PIC ... Read More
Mandalika
2K+ Views
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 ... Read More
Mandalika
2K+ Views
The main difference between INCLUDE and COPY statement is the PDS member with INCLUDE statement is expanded during pre-compilation while the PDS member with COPY statement is expanded during compilation.Since the DCLGEN member contains column names of the table (table structure) it is necessary to expand it during the pre-compilation. ... Read More
Mandalika
3K+ Views
A COBOL-DB2 program can query/update/insert/delete data from multiple DB2 tables. However, in order to achieve this, we must fulfill two main conditions.Notify the structure of the DB2 table to the COBOL-DB2 program. This includes all the columns and data types of these columns.The respective host variables for each column. The ... Read More