NULLCHARVAL= Data Set Option

Specifies the character string that replaces missing SAS character values 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: a blank character
Restriction: The NULLCHARVAL= 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: DBFORCE= data set option, DBINDEX= data set option, DBKEY= data set option, DBNULL= data set option, NULLCHAR= data set option

Table of Contents

Syntax

NULLCHARVAL='character-string'

Details

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

It also works with NULLCHAR= to determine whether a missing SAS character value is treated as a NULL value. If NULLCHARVAL= is longer than the maximum column width, the string is truncated if DBFORCE=YES or the operation fails if DBFORCE=NO.

Last updated: February 3, 2026