- 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
What will happen if a NULL value is detected for a SQL statement in COBOL-DB2 program and the NULL indicator is not used?
There is no concept of NULL in COBOL language. Therefore, if any of the columns in DB2 table can hold NULL value then we need to give the NULL indicator in SELECT query in order to detect the NULL value.
However, if we miss to give the null indicator in the SELECT query and any of the columns contains the NULL value then the query will fail and we will get a value of -305 in SQLCODE field of SQLCA. As per the IBM documentation -305 value states that.
“THE NULL VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER position-number BECAUSE NO INDICATOR VARIABLE IS SPECIFIED”
- Related Articles
- What will be the result if SQLCA is not included in a COBOL-DB2 program?
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- What is the purpose of the "FOR UPDATE OF" clause in a cursor? What will happen if we fire an UPDATE statement without using this clause in a COBOL-DB2 program?
- How will the COBOL-DB2 program behave if the DCLGEN member is not included?
- How to verify NULL value in DB2 column data using COBOL paragraph?
- What we can conclude if the final value in the NULL indicator is -2?
- What is the purpose of “NOT NULL WITH DEFAULT” clause used in DB2 table column?
- Insert default into not null column if value is null in MySQL?
- What is NULL check and insertion rule in a DB2 table?
- In MySQL what is the difference between != NULL and IS NOT NULL?
- What is the benefit of MySQL ‘IS NULL’ and ‘IS NOT NULL’?
- What is the purpose and usage of “FOR UPDATE OF” clause in a COBOL-DB2 program
- Check if a String is not empty ("") and not null in Java
- What is the usage and purpose of DCLGEN and host variables used in COBOL-DB2 program
- Working with NULL and IS NOT NULL in MySQL

Advertisements