- 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
How will the COBOL-DB2 program behave when there is a mismatch between the host variable and number of columns in the SELECT statement?
In case there is a mismatch in the number of columns and number of host variables,the query will fail. There are two ways in which we can detect this condition.
The SQLWARN3 field of SQLCA will get the value as ‘W’ in case there is a mismatch.
In some installations the SQLCODE field for SQLCA gets the error code as -804 when there is a mismatch.
We can use IF condition to check the value in SQLWARN3 or SQLCODE and direct the program processing accordingly.
Advertisements