NULLCHAR= Data Set Option

Indicates how missing SAS character values are handled during insert, update, DBINDEX=, and DBKEY= processing.

Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software)
Category: Data Set Control
Default: SAS
Restriction: The NULLCHAR= data set option does not apply to binary data types, such as the SQL_LONGVARBINARY type in ODBC or the VARBINARY type in Netezza.
Data source: Amazon Redshift, Aster, DB2 under UNIX and PC Hosts, DB2 under z/OS, Google BigQuery, Greenplum, HAWQ, Impala, Informix, Microsoft SQL Server, MySQL, Netezza, ODBC, OLE DB, Oracle, PostgreSQL, SAP ASE, SAP HANA, SAP IQ, Snowflake, Teradata, Vertica, Yellowbrick
Note: Support for Yellowbrick was added in SAS 9.4M7.
See: BULKLOAD= data set option, DBINDEX= data set option, DBKEY= data set option, DBNULL= data set option, NULLCHARVAL= data set option

Table of Contents

Syntax

NULLCHAR=SAS | YES | NO

Syntax Description

SAS

indicates that missing character values in SAS data sets are treated as NULL values if the DBMS allows these. Otherwise, they are treated as the NULLCHARVAL= value.

YES

indicates that missing character values in SAS data sets are treated as NULL values if the DBMS allows these. Otherwise, an error is returned.

NO

indicates that missing character values in SAS data sets are treated as the NULLCHARVAL= value—regardless of whether the DBMS allows NULL values for the column.

Details

This option affects insert and update processing. It also applies when you use DBINDEX= and DBKEY=.

It works with NULLCHARVAL=, which determines what is inserted when NULL values are not allowed. The DBMS treats all missing SAS numeric values (represented in SAS as '.') as NULLvalues.

Oracle: For interactions between NULLCHAR= and BULKLOAD=ZX`11, see the bulk-load topic in the Oracle section.

Last updated: February 3, 2026