Nullable Columns Rule

For writable tables, any column that is going to store an SQL NULL value must have a null condition-name.

If you have a table with multiple record types, it is possible to mark columns as nullable without an underlying null condition-name. This supports the case where the item upon which the column is based is not part of the record type being written for a particular INSERT statement or for a numeric item that is set to return a null value if it contains non-numeric data. Setting a column as nullable does not by itself allow a null value to be stored. It is safer to assign a null condition-name to any data item that might receive a null value. If you mark a column as nullable without having a null condition-name, and a null value is written, the write operation will fail with an error.

In this example, the PF-PRODUCT-SIZE data item has a null condition-name. This allows the column PRODUCTSIZE to be nullable. If a write operation is executed on this table, Relativity will know what value to store in the COBOL data file if the column contains a null value.