PRESERVE_USER= LIBNAME Statement Option

Preserves the case of the value in the USER= connection option.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Access
Default: NO
Interactions: Use the SAS_DB2_PRESERVE_USER, SAS_NETEZZA_PRESERVE_USER, or SAS_ODBC_PRESERVE_USER environment variable for the SAS session.
The LIBNAME option value overrides the environment variable.
Data source: DB2 under UNIX and PC Hosts, ODBC, Netezza
Examples: Set the LIBNAME option:
libname mydblib db2 user=myuser1 pass=mypwd1 PRESERVE_USER=YES;
Specify the appropriate environment variable on PC hosts in the Advanced system settings:
SAS_DB2_PRESERVE_USER YES
SAS_NETEZZA_PRESERVE_USER YES
SAS_ODBC_PRESERVE_USER YES
Export the appropriate environment variable on UNIX hosts for the Bourne shell:
export SAS_DB2_PRESERVE_USER=YES
export SAS_NETEZZA_PRESERVE_USER=YES
export SAS_ODBC_PRESERVE_USER=YES
Export the appropriate environment variable on UNIX hosts for the C shell:
setenv SAS_DB2_PRESERVE_USER=YES
setenv SAS_NETEZZA_PRESERVE_USER=YES
setenv SAS_ODBC_PRESERVE_USER=YES
Specify the appropriate environment variable at SAS invocation for UNIX and PC hosts:
sas -set SAS_DB2_PRESERVE_USER YES
sas -set SAS_NETEZZA_PRESERVE_USER YES
sas -set SAS_ODBC_PRESERVE_USER YES

Table of Contents

Syntax

PRESERVE_USER=YES | NO

Required Arguments

YES

specifies that SAS/ACCESS preserves the case of the value for the USER= option.

NO

specifies that SAS/ACCESS changes the value for the USER= option to uppercase for use in later connections.

Details

DB2 and Netezza typically accept user names that are not case sensitive. Similarly, the ODBC engine can be used to connect to databases that accept user names that are not case sensitive. However, some authentication protocols, such as LDAP, allow case-sensitive user names. When you use such protocols with your database, you can specify PRESERVE_USER=YES so that the SAS/ACCESS engine retains the original case of the USER= option.

Last updated: February 3, 2026