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”