NULL XFD Directive

Restriction: This topic applies only when a Database Connectors license has been installed via the Micro Focus License Management System.

The NULL XFD directive handles NULL values in numeric tables by comparing non-key field values when performing read and write actions on the database to determine and perform appropriate actions.


$XFD NULL=literal
where literal is any literal value, or one of the following special literals to indicate that the field is comprised entirely of a specific type of value:

Specify the NULL XFD directive on individual numeric fields within the COBOL FD.

During a write to the database, this directive compares the value of the COBOL numeric field against its own set literal value. If the values are equal, it writes a NULL value to the database.

During a read of the database, if a NULL value is returned, this directive places its own set literal value into the COBOL numeric field before returning to the COBOL program.

Note: Fields allowing NULL values are not allowed as part of a record key. If the compiler encounters a record key containing NULL values, it returns a syntax error.