LIBNAME Statement: PC Files on Linux, UNIX, and 64-Bit Microsoft Windows |
Valid in: | DATA and PROC steps |
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 the NULL value is valid for the specified columns.
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. 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--not the Excel engine--supports this option.
Examples |
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;
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;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.