SAS Institute. The Power to Know

SAS/ACCESS(R) 9.2 Interface to PC Files: Reference

space
Previous Page | Next Page

The LIBNAME Statement for PC Files on Microsoft Windows

DBNULL= Data Set Option



Indicates 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 value: YES

Syntax
Syntax Description
Details
Examples

Syntax

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

Syntax Description

YES

specifies that the NULL value is valid for the specified columns.

NO

specifies that the 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, so 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.

Only the Access engine--not the Excel engine--supports this option.


Examples

In the following example, by using the DBNULL= option, the EmpId and Jobcode columns in the new MyDBLib.MyDept2 table are prevented from accepting null values. If the Employees table contains 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 the following 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 null values in any column other than the Jobcode column, the DATA step fails.

data mydblib.mydept3(dbnull=(_ALL_=no jobcode=YES));
   set mydblib.employees;
run; 

space
Previous Page | Next Page | Top of Page