support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Data Access > COBOL/ESQL and Veryant ESQL Generator > How is it possible to insert a NULL into an ORACLE TABLE when host variable has been initialized?
Question Title How is it possible to insert a NULL into an ORACLE TABLE when host variable has been initialized?

To achieve this goal, you have to use the indicator variables:


      *Put a NULL value in a record using indicator variables
           move 6      to V-KEY
           move spaces to V-DATA
           move -1     to IND-VAR
           EXEC SQL INSERT INTO V_TABLE VALUES (:V-KEY, :V-DATA:IND-VAR) 
           END-EXEC

When the value of the indicator variable is equal to -1, the value of the host variable is ignored and NULL will be used, instead.
All info related to the indicator variable are available at the isCOBOL documentation in the 'Language Reference Manual-> Embedded SQL-> Indicator Variables' chapter.
Authored by: Veryant Support This question has been viewed 3770 times so far.
Click Here to View all the questions in COBOL/ESQL and Veryant ESQL Generator category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Does isCOBOL support PostgreSQL?
  2. How do I set up isCOBOL ESQL Generator for use with Microsoft SQL Server?
  3. How do I use isCOBOL ESQL with Microsoft SQL Server?
  4. How do I connect to a MS SQL 2005 Named Instance?
  5. How do I migrate a Vision file to an Oracle database table?
  6. Set iscobol.jdbc.autocommit=false when using ESQL in TP environments
  7. Where is the Veryant ESQL Generator? What files do I download?
  8. How does isCOBOL limit the size of database query working set for the START statement?
  9. How do I set up isCOBOL ESQL Generator for use with Microsoft SQL Server?
  10. How is READ NEXT implemented in isCOBOL ESQL Generator (EasyDB)?
  11. How do I get isCOBOL to create a database table when iscobol.file_suffix is set?
Article Information Additional Information
Article Number: 221
Created: 2013-11-22 4:45 AM
Rating: 1 Star
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.