Programming Guide |
Tests whether a field is null
int sm_null(int field_number);int sm_e_null(char *field_name, int element);int sm_i_null(char *field_name, int occurrence);int sm_n_null(char *field_name);int sm_o_null(int field_number, int occurrence);
field_name, field_number
- Specifies the field to test.
element
- The element in
field_name
to test.occurrence
- The occurrence in the specified field to test.
- 1 True: the field's Null Field property is set to Yes and contains a null value.
- 0 False: the field's Null Field property is set to No or it does not contain a null value.
Use
sm_null
to test whether a field's value is null or not. This function checks whether a field'snull_field
property is set toPV_YES
; if it is,sm_null
gets the field's null indicator and compares it to the field's value.You can specify the field's null indicator string through the message file and/or the field's Null Text property.