CICS VSAM Transparency for z/OS, Version 1.2


SQL statement for nullable columns

The IRD issues SQL insert and update calls.

When you are processing a nullable column, you must specify a null indicator variable in the VALUES clause of your insert statement. Here is an example:
EXEC SQL
       INSERT INTO TB_MYFILE (
              MYFILE_KEY,
              MYFILE_COL1,
              MYFILE_COL1,
              MYFILE_COL3)
       VALUES (
              :HV-KEY,
              :HV-COL1,
              :HV-COL2,
              :HV-COL3:HVNULL-IND)
The column MYFILE_COL3 is nullable. The working storage variable HVNULL-IND is the null indicator field. A value less than 0 will result in a null value for this insert.


Concept topic


Last updated: December 6, 2013 20:45:0

Concept Concept

Feedback


Timestamp icon Last updated: Friday, 6 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///topics/cvtdecSQLStatementForNullableColumns.html