LIBNAME Statement: PC Files on Microsoft Windows |
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) |
specifies that a NULL value is valid for the specified columns.
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.
Examples |
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;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.