DBNULL

Specifies whether NULL is a valid value for the specified columns when a table is created.
Valid in: DATA and PROC steps (when accessing PC files data using SAS/ACCESS software)
Default: YES

Syntax

DBNULL=
(<column-name-1> =YES|NO
<column-name-n> =YES|NO
<_ALL_> =YES|NO)

Syntax Description

YES
specifies that a NULL value is valid for the specified columns.
NO
specifies that a NULL value is not valid for the specified columns.

Details

this option is valid only for creating data source tables. If you specify more than one column name, the names must be separated with spaces.
The DBNULL= option processes values from left to right. If you specify a column name twice, or if you use the _ALL_ value, the last value overrides the first value specified for the column.
Note: only the Access engine supports this option. The Excel engine does not support this option.

Example: Specify NULL Value Disposition

In this example, using the DBNULL option prevents the EmpId and Jobcode columns in the new MyDBLib.MyDept2 table from accepting null values. If the Employees table contains any null values in the EmpId or Jobcode columns, the DATA step fails.
DATA mydblib.mydept2(DBNULL=(empid=no jobcode=no));
 SET mydblib.employees;
RUN; 
In this example, all columns in the new MyDBLib.MyDept3 table except for the Jobcode column are prevented from accepting null values. If the Employees table contains any null values in any column other than the Jobcode column, the DATA step fails.
DATA mydblib.mydept3(DBNULLl=(_ALL_=no jobcode=YES));
 SET mydblib.employees;
RUN;