- 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 to verify NULL value in DB2 column data using COBOL paragraph?
In order to accomplish this, we will make use of NULL indicator after the SELECT query on the INVOICE_ID of the ORDERS table. If the NULL indicator has the value as -1 then we can conclude that INVOIVE_ID has a null value.
Below is a COBOL paragraph for this−
A010-CHECK-ORDER. EXEC SQL SELECT INVOICE_ID INTO :INVOICE_ID_DATA :INVOICE_ID_N FROM ORDERS WHERE ORDER_ID = ‘678542112’ END-EXEC IF INVOICE-ID-N = -1 MOVE SPACES TO INVOICE-ID-DATA END-IF
INVOICE-ID-N is a null indicator here which is generated automatically by DCLGEN utility.
Advertisements